Skip to content

Commit

Permalink
Upgrade: Replace deprecated Behat steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Aug 23, 2024
1 parent c5ce0a4 commit c7fc1e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-08-22 - Upgrade: Replace deprecated Behat steps.
* 2024-08-20 - Prepare compatibility for Moodle 4.4.

### v4.3-r3
Expand Down
20 changes: 10 additions & 10 deletions tests/behat/availability_cohort.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Feature: availability_cohort
Scenario: Try to add a cohort condition if no cohorts exist yet
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I expand all fieldsets
And I click on "Add restriction..." "button"
Then "Cohort" "button" should not exist in the "Add restriction..." "dialogue"
Expand All @@ -41,7 +41,7 @@ Feature: availability_cohort
| Cohort 2 | CH2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I expand all fieldsets
And I click on "Add restriction..." "button"
Then "Cohort" "button" should exist in the "Add restriction..." "dialogue"
Expand All @@ -53,7 +53,7 @@ Feature: availability_cohort
| Cohort 2 | CH2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Cohort" "button"
Expand All @@ -76,7 +76,7 @@ Feature: availability_cohort
| Cohort 2 | CH2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I set the following fields to these values:
| Name | P1 |
| Description | x |
Expand All @@ -87,7 +87,7 @@ Feature: availability_cohort
And I set the field "Cohort" to "Cohort 1"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
And I add a "Page" to section "2"
And I add a page to section "2" using the activity chooser
And I set the following fields to these values:
| Name | P2 |
| Description | x |
Expand Down Expand Up @@ -115,7 +115,7 @@ Feature: availability_cohort
| student2 | CH2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Cohort" "button"
Expand Down Expand Up @@ -146,7 +146,7 @@ Feature: availability_cohort
| student2 | CH2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I set the following fields to these values:
| Name | P1 |
| Description | x |
Expand All @@ -157,7 +157,7 @@ Feature: availability_cohort
And I set the field "Cohort" to "Cohort 1"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
And I add a "Page" to section "2"
And I add a page to section "2" using the activity chooser
And I set the following fields to these values:
| Name | P2 |
| Description | x |
Expand Down Expand Up @@ -186,7 +186,7 @@ Feature: availability_cohort
| Cohort in category 2 | CCH2 | Category | CAT2 | 1 |
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I set the following fields to these values:
| Name | P1 |
| Description | x |
Expand All @@ -199,7 +199,7 @@ Feature: availability_cohort
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 "Page" to section "1"
And I add a page to section "1" using the activity chooser
And I set the following fields to these values:
| Name | P1 |
| Description | x |
Expand Down

0 comments on commit c7fc1e8

Please sign in to comment.