Skip to content

Commit

Permalink
585 Fix deprecated Behat steps (#586)
Browse files Browse the repository at this point in the history
Update Behat tests replacing steps deprecated by MDL-79029.
  • Loading branch information
leonstr authored Aug 28, 2024
1 parent 81c026d commit a581289
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions tests/behat/public_questionnaire.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand Down
6 changes: 2 additions & 4 deletions tests/behat/public_questionnaire_teacher.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,15 @@ 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] |
Then I should see "Questionnaire instance 1"
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] |
Expand Down
6 changes: 2 additions & 4 deletions tests/behat/view_questionnaire.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a581289

Please sign in to comment.