From f1d79b58c44ee4470f97ea414f63784fc0b25e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 28 Aug 2024 09:52:44 +0200 Subject: [PATCH] Fix the Behat tests using deprecated activity add cmd, resolves #585 --- tests/behat/public_questionnaire.feature | 4 ++-- tests/behat/public_questionnaire_teacher.feature | 4 ++-- tests/behat/view_questionnaire.feature | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/behat/public_questionnaire.feature b/tests/behat/public_questionnaire.feature index c2b32000..9f4151a3 100644 --- a/tests/behat/public_questionnaire.feature +++ b/tests/behat/public_questionnaire.feature @@ -39,14 +39,14 @@ Feature: Questionnaires can use an existing public survey to gather responses in | Question Text | Enter a number | And I am on "Course 2" course homepage with editing mode on - And I add a "Questionnaire" to section "1" and I fill the form with: + And I add a questionnaire activity to course "Course 2" section "1" and I fill the form with: | Name | Questionnaire instance 1 | | Description | Description | | Use public | Public questionnaire [Course 1] | Then I should see "Questionnaire instance 1" And I am on "Course 3" course homepage with editing mode on - And I add a "Questionnaire" to section "1" and I fill the form with: + And I add a questionnaire activity to course "Course 3" section "1" and I fill the form with: | Name | Questionnaire instance 2 | | Description | Description | | Use public | Public questionnaire [Course 1] | diff --git a/tests/behat/public_questionnaire_teacher.feature b/tests/behat/public_questionnaire_teacher.feature index 949bb8bf..43c7625d 100644 --- a/tests/behat/public_questionnaire_teacher.feature +++ b/tests/behat/public_questionnaire_teacher.feature @@ -42,7 +42,7 @@ Feature: Public questionnaires gather all instance responses in one master cours And I log in as "teacher2" And I am on "Course 2" course homepage with editing mode on - And I add a "Questionnaire" to section "1" and I fill the form with: + And I add a questionnaire activity to course "Course 2" section "1" and I fill the form with: | Name | Questionnaire instance 1 | | Description | Description | | Use public | Public questionnaire [Course 1] | @@ -51,7 +51,7 @@ Feature: Public questionnaires gather all instance responses in one master cours And I log in as "teacher3" And I am on "Course 3" course homepage with editing mode on - And I add a "Questionnaire" to section "1" and I fill the form with: + And I add a questionnaire activity to course "Course 3" section "1" and I fill the form with: | Name | Questionnaire instance 2 | | Description | Description | | Use public | Public questionnaire [Course 1] | diff --git a/tests/behat/view_questionnaire.feature b/tests/behat/view_questionnaire.feature index ea9d39e9..503a138d 100644 --- a/tests/behat/view_questionnaire.feature +++ b/tests/behat/view_questionnaire.feature @@ -71,14 +71,14 @@ Feature: Questionnaires can be public, private or template And I press "Save and return to course" # Verify that a public questionnaire cannot be used in the same course. And I am on "Course 1" course homepage with editing mode on - And I add a "Questionnaire" to section "1" + And I add a questionnaire activity to course "Course 1" section "1" And I expand all fieldsets Then I should see "(No public questionnaires.)" And I press "Cancel" # Verify that a public questionnaire can be used in a different course. And I am on site homepage And I am on "Course 2" course homepage - And I add a "Questionnaire" to section "1" + And I add a questionnaire activity to course "Course 2" section "1" And I expand all fieldsets And I set the field "name" to "Questionnaire from public" And I click on "Test questionnaire [Course 1]" "radio"