MDL-74021 behat: Page behat generators use UI

Replace steps that manually add page instances via the UI and use
Behat generators. This improves the speed of Behat test runs.

Co-authored-by: Simey Lameze <[email protected]>
This commit is contained in:
Angelia Dela Cruz
2023-06-19 17:20:13 +08:00
co-authored by Simey Lameze
parent 2c14ed0469
commit 2c8f3c7ed5
12 changed files with 109 additions and 297 deletions
@@ -34,8 +34,11 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activity" exists:
| activity | page |
| course | C1 |
| name | P1 |
And I log in as "admin"
And I am on site homepage
When I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Check the icon is there (it should be a Hide icon, meaning is currently visible).
@@ -51,8 +54,7 @@ Feature: Manage availability conditions
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I am on the "P1" "page activity editing" page
And I expand all fieldsets
And I click on "Add restriction..." "button"
And "Add restriction..." "dialogue" should be visible