Skip to content

Commit a581289

Browse files
authored
585 Fix deprecated Behat steps (#586)
Update Behat tests replacing steps deprecated by MDL-79029.
1 parent 81c026d commit a581289

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

tests/behat/public_questionnaire.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ Feature: Questionnaires can use an existing public survey to gather responses in
3838
| Yes | y |
3939
| Question Text | Enter a number |
4040

41-
And I am on "Course 2" course homepage with editing mode on
42-
And I add a "Questionnaire" to section "1" and I fill the form with:
41+
And I add a questionnaire activity to course "Course 2" section "1" and I fill the form with:
4342
| Name | Questionnaire instance 1 |
4443
| Description | Description |
4544
| Use public | Public questionnaire [Course 1] |
4645
Then I should see "Questionnaire instance 1"
4746

48-
And I am on "Course 3" course homepage with editing mode on
49-
And I add a "Questionnaire" to section "1" and I fill the form with:
47+
And I add a questionnaire activity to course "Course 3" section "1" and I fill the form with:
5048
| Name | Questionnaire instance 2 |
5149
| Description | Description |
5250
| Use public | Public questionnaire [Course 1] |

tests/behat/public_questionnaire_teacher.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,15 @@ Feature: Public questionnaires gather all instance responses in one master cours
4141
And I log out
4242

4343
And I log in as "teacher2"
44-
And I am on "Course 2" course homepage with editing mode on
45-
And I add a "Questionnaire" to section "1" and I fill the form with:
44+
And I add a questionnaire activity to course "Course 2" section "1" and I fill the form with:
4645
| Name | Questionnaire instance 1 |
4746
| Description | Description |
4847
| Use public | Public questionnaire [Course 1] |
4948
Then I should see "Questionnaire instance 1"
5049
And I log out
5150

5251
And I log in as "teacher3"
53-
And I am on "Course 3" course homepage with editing mode on
54-
And I add a "Questionnaire" to section "1" and I fill the form with:
52+
And I add a questionnaire activity to course "Course 3" section "1" and I fill the form with:
5553
| Name | Questionnaire instance 2 |
5654
| Description | Description |
5755
| Use public | Public questionnaire [Course 1] |

tests/behat/view_questionnaire.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ Feature: Questionnaires can be public, private or template
7070
And I set the field "id_realm" to "public"
7171
And I press "Save and return to course"
7272
# Verify that a public questionnaire cannot be used in the same course.
73-
And I am on "Course 1" course homepage with editing mode on
74-
And I add a "Questionnaire" to section "1"
73+
And I add a questionnaire activity to course "Course 1" section "1"
7574
And I expand all fieldsets
7675
Then I should see "(No public questionnaires.)"
7776
And I press "Cancel"
7877
# Verify that a public questionnaire can be used in a different course.
7978
And I am on site homepage
80-
And I am on "Course 2" course homepage
81-
And I add a "Questionnaire" to section "1"
79+
And I add a questionnaire activity to course "Course 2" section "1"
8280
And I expand all fieldsets
8381
And I set the field "name" to "Questionnaire from public"
8482
And I click on "Test questionnaire [Course 1]" "radio"

0 commit comments

Comments
 (0)