MDL-64736 course: Rewrite behat step to avoid changing a checkbox

This commit is contained in:
Andrew Nicols 2019-02-12 07:37:16 +08:00
parent be521ca625
commit e3c4a1fc9f

View file

@ -19,6 +19,7 @@ Feature: View subfolders in a course in-line
And I add a "Folder" to section "3" and I fill the form with:
| Name | Test folder |
| Display folder contents | On a separate page |
| Show subfolders expanded | |
And I should see "Test folder"
And I follow "Test folder"
And I press "Edit"
@ -42,6 +43,12 @@ Feature: View subfolders in a course in-line
Then I should not see "Test subfolder 2"
And I follow "Test folder"
And I should see "Test subfolder 2"
Given I navigate to "Edit settings" in current page administration
And I set the field "Show subfolders expanded" to "1"
When I am on "Course 1" course homepage
Then I should not see "Test subfolder 2"
And I follow "Test folder"
And I should see "Test subfolder 2"
@javascript
Scenario: Make the subfolders viewable inline on the course page
@ -51,14 +58,12 @@ Feature: View subfolders in a course in-line
And I set the field "New folder name" to "Test sub subfolder"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
And I should see "Test sub subfolder"
And I navigate to "Edit settings" in current page administration
And I set the field "Display folder contents" to "Inline on a course page"
And I set the field "Show subfolders expanded" to ""
When I set the field "Display folder contents" to "Inline on a course page"
And I press "Save and return to course"
And I should see "Test subfolder 1"
Then I should see "Test subfolder 1"
And I should not see "Test sub subfolder"
And I open "Test folder" actions menu
Given I open "Test folder" actions menu
When I click on "Edit settings" "link" in the "Test folder" activity
And I set the field "Show subfolders expanded" to "1"
And I press "Save and return to course"