mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-72875 course: Update behat test to use the tertiary nav
This commit is contained in:
parent
e0d7dbd022
commit
3cddee197f
@ -61,7 +61,7 @@ Feature: Set up contextual data for tests
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I should see "Grouping 1"
|
||||
And I should see "Grouping 2"
|
||||
|
||||
|
@ -42,7 +42,7 @@ Feature: Edit capabilities
|
||||
| mod/forum:editanypost | Prevent |
|
||||
| mod/forum:addquestion | Allow |
|
||||
When I set the field "Advanced role override" to "Student (3)"
|
||||
And I press "Go"
|
||||
And I click on "Go" "button" in the "div.advancedoverride" "css_element"
|
||||
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
|
||||
And "mod/forum:editanypost" capability has "Prevent" permission
|
||||
And "mod/forum:addquestion" capability has "Allow" permission
|
||||
|
@ -79,7 +79,7 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Course 2" in the "#course-listing" "css_element"
|
||||
And I am on "Course 2" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I follow "Overview"
|
||||
And I select "Overview" from the "jump" singleselect
|
||||
And "Student 1" "text" should exist in the "Group A" "table_row"
|
||||
And "Student 2" "text" should exist in the "Group A" "table_row"
|
||||
And "Student 2" "text" should exist in the "Group B" "table_row"
|
||||
|
@ -43,7 +43,7 @@ Feature: Import course's contents into another course
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
Then I should see "Non-editing teacher (1)"
|
||||
And I set the field "Advanced role override" to "Non-editing teacher (1)"
|
||||
And I press "Go"
|
||||
And I click on "Go" "button" in the "div.advancedoverride" "css_element"
|
||||
And "enrol/manual:enrol" capability has "Allow" permission
|
||||
|
||||
Scenario: Import process without permission option
|
||||
|
@ -33,7 +33,7 @@ Feature: Option to include groups and groupings when importing a course to anoth
|
||||
When I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I should see "Grouping 1"
|
||||
And I should see "Grouping 2"
|
||||
|
||||
@ -43,6 +43,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
|
||||
When I navigate to "Users > Groups" in current page administration
|
||||
Then I should not see "Group 1"
|
||||
And I should not see "Group 2"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I should not see "Grouping 1"
|
||||
And I should not see "Grouping 2"
|
||||
|
@ -250,7 +250,7 @@ Feature: Test category management actions
|
||||
# Redirect
|
||||
And I should see "Assign roles in Category: Cat 1"
|
||||
And I should see "Please choose a role to assign"
|
||||
And I click on "Back to Category: Cat 1" "link"
|
||||
And I click on "Back" "button"
|
||||
# Redirect
|
||||
And I should see the "Course categories and courses" management page
|
||||
And "Cat 1" "link" should exist in the "#category-listing" "css_element"
|
||||
|
@ -67,7 +67,7 @@ Feature: Automatic creation of groups
|
||||
And I should see "No" in the "Group messaging" "select"
|
||||
And I press "Cancel"
|
||||
# Check groupings.
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I should see "Grouping name"
|
||||
And I click on "Show groups in grouping" "link" in the "Grouping name" "table_row"
|
||||
And the "removeselect" select box should contain "Group A"
|
||||
|
@ -114,7 +114,7 @@ Feature: Organize students into groups
|
||||
| Group name | The greatest group that never existed |
|
||||
And I press "Save changes"
|
||||
And I should see "The greatest group that never existed"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I press "Create grouping"
|
||||
And the "idnumber" "field" should be readonly
|
||||
And I set the following fields to these values:
|
||||
|
@ -34,12 +34,12 @@ Feature: Custom profile fields in groups
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
|
||||
# Check the Overview page.
|
||||
And I follow "Overview"
|
||||
And I select "Overview" from the "jump" singleselect
|
||||
And "Robin Hood (user1, fox)" "text" should exist in the "Canines" "table_row"
|
||||
And "Little John (user2, bear)" "text" should exist in the "No group" "table_row"
|
||||
|
||||
# Check the groups page.
|
||||
And I follow "Groups"
|
||||
And I select "Groups" from the "jump" singleselect
|
||||
And I set the field "groups" to "Canines"
|
||||
And I should see "Robin Hood (user1, fox)"
|
||||
And I should not see "Little John (user2, bear)"
|
||||
|
@ -26,7 +26,7 @@ Feature: Automatic deletion of groups and groupings
|
||||
| Group name | Group (with ID) |
|
||||
| Group ID number | An ID |
|
||||
And I press "Save changes"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I press "Create grouping"
|
||||
And I set the following fields to these values:
|
||||
| Grouping name | Grouping (without ID) |
|
||||
@ -36,7 +36,7 @@ Feature: Automatic deletion of groups and groupings
|
||||
| Grouping name | Grouping (with ID) |
|
||||
| Grouping ID number | An ID |
|
||||
And I press "Save changes"
|
||||
And I follow "Groups"
|
||||
And I select "Groups" from the "jump" singleselect
|
||||
|
||||
@javascript
|
||||
Scenario: Delete groups and groupings with and without ID numbers
|
||||
@ -48,7 +48,7 @@ Feature: Automatic deletion of groups and groupings
|
||||
And I press "Delete selected group"
|
||||
And I press "Yes"
|
||||
And the "groups" select box should not contain "Group (with ID) (0)"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
|
||||
And I press "Yes"
|
||||
And I should not see "Grouping (without ID)"
|
||||
@ -72,7 +72,7 @@ Feature: Automatic deletion of groups and groupings
|
||||
And I press "Delete selected group"
|
||||
And I press "Yes"
|
||||
And I should not see "Group (without ID)"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row"
|
||||
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
|
||||
And I press "Yes"
|
||||
|
@ -42,7 +42,7 @@ Feature: Importing of groups and groupings
|
||||
And I should see "No" in the "Group messaging" "select"
|
||||
And I press "Cancel"
|
||||
# Check groupings
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I should see "Grouping-1"
|
||||
And I should see "Grouping-2"
|
||||
And I should see "Grouping-3"
|
||||
|
@ -42,7 +42,7 @@ Feature: Uniqueness of Group ID number
|
||||
And I press "Cancel"
|
||||
|
||||
Scenario: Grouping ID number uniqueness
|
||||
Given I follow "Groupings"
|
||||
Given I select "Groupings" from the "jump" singleselect
|
||||
And I press "Create grouping"
|
||||
And I set the following fields to these values:
|
||||
| Grouping name | Grouping 1 |
|
||||
|
@ -59,7 +59,7 @@ Feature: Group overview
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I follow "Overview"
|
||||
And I select "Overview" from the "jump" singleselect
|
||||
|
||||
# Grouping All and Group All filter
|
||||
When I select "All" from the "Grouping" singleselect
|
||||
|
@ -26,7 +26,7 @@ Feature: Automatic updating of groups and groupings
|
||||
| Group name | Group (with ID) |
|
||||
| Group ID number | An ID |
|
||||
And I press "Save changes"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I press "Create grouping"
|
||||
And I set the following fields to these values:
|
||||
| Grouping name | Grouping (without ID) |
|
||||
@ -36,7 +36,7 @@ Feature: Automatic updating of groups and groupings
|
||||
| Grouping name | Grouping (with ID) |
|
||||
| Grouping ID number | An ID |
|
||||
And I press "Save changes"
|
||||
And I follow "Groups"
|
||||
And I select "Groups" from the "jump" singleselect
|
||||
|
||||
@javascript
|
||||
Scenario: Update groups and groupings with ID numbers
|
||||
@ -52,7 +52,7 @@ Feature: Automatic updating of groups and groupings
|
||||
And I press "Edit group settings"
|
||||
And the field "idnumber" matches value "An ID (updated)"
|
||||
And I press "Save changes"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I click on "Edit" "link" in the "Grouping (with ID)" "table_row"
|
||||
And the field "idnumber" matches value "An ID"
|
||||
And I set the following fields to these values:
|
||||
@ -86,7 +86,7 @@ Feature: Automatic updating of groups and groupings
|
||||
And the "idnumber" "field" should be readonly
|
||||
And the field "idnumber" matches value "An ID"
|
||||
And I press "Save changes"
|
||||
And I follow "Groupings"
|
||||
And I select "Groupings" from the "jump" singleselect
|
||||
And I click on "Edit" "link" in the "Grouping (with ID)" "table_row"
|
||||
And the "idnumber" "field" should be readonly
|
||||
And the field "idnumber" matches value "An ID"
|
||||
|
@ -81,7 +81,7 @@ class behat_permissions extends behat_base {
|
||||
);
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('go'), 'button', 'region-main', 'region']);
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('go'), 'button', "div.advancedoverride", 'css_element']);
|
||||
}
|
||||
|
||||
$this->execute("behat_permissions::i_fill_the_capabilities_form_with_the_following_permissions", $table);
|
||||
|
Loading…
x
Reference in New Issue
Block a user