diff --git a/tests/behat/public_questionnaire.feature b/tests/behat/public_questionnaire.feature index c2b32000..8b719d34 100644 --- a/tests/behat/public_questionnaire.feature +++ b/tests/behat/public_questionnaire.feature @@ -38,15 +38,13 @@ Feature: Questionnaires can use an existing public survey to gather responses in | Yes | y | | 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..5c51c583 100644 --- a/tests/behat/public_questionnaire_teacher.feature +++ b/tests/behat/public_questionnaire_teacher.feature @@ -41,8 +41,7 @@ Feature: Public questionnaires gather all instance responses in one master cours And I log out 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] | @@ -50,8 +49,7 @@ Feature: Public questionnaires gather all instance responses in one master cours And I log out 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..1ec5187d 100644 --- a/tests/behat/view_questionnaire.feature +++ b/tests/behat/view_questionnaire.feature @@ -70,15 +70,13 @@ Feature: Questionnaires can be public, private or template And I set the field "id_realm" to "public" 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"