MDL-74841 behat: Label behat generators use UI

Replace steps that manually add Label instances via the UI and use
Behat generators. This improves the speed of Behat test runs. Fix
for failing test.
This commit is contained in:
Angelia Dela Cruz
2022-07-01 10:43:48 +08:00
parent 63c3c3f76e
commit da07dbda3f
@@ -96,6 +96,7 @@ Feature: Show/hide course sections
And I should not see "Topic 2" in the "region-main" "region"
And I should see "Topic 1" in the "region-main" "region"
@javascript
Scenario: Students can not navigate to restricted sections
Given I am on "Course 1" course homepage
Given I navigate to "Settings" in current page administration
@@ -104,7 +105,7 @@ Feature: Show/hide course sections
| Enable completion tracking | Yes |
And I press "Save and display"
And the following "activities" exist:
| activity | course | section | intro | completion |
| activity | course | section | name | completion |
| label | C1 | 1 | Test label | 1 |
And I edit the section "2"
And I expand all fieldsets