Commit ba5c5083 authored by Damyon Wiese's avatar Damyon Wiese
Browse files

MDL-55074 theme_boost: Behat fixes for latest theme changes

Fix I edit profile steps
Apply fixed header in css
Remove transitions from menus for behat
Be more specific about some "I follow" steps
Navigation path changes
"Current course" node removed from nav tree
Adapt tests because there are no default blocks
Force some space between action menu items
parent c9c1e4ba
......@@ -172,7 +172,6 @@ preferences,moodle|/user/preferences.php|preferences',
$temp->add(new admin_setting_configcheckbox('navshowcategories', new lang_string('navshowcategories', 'admin'), new lang_string('confignavshowcategories', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navshowmycoursecategories', new lang_string('navshowmycoursecategories', 'admin'), new lang_string('navshowmycoursecategories_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('navshowallcourses', new lang_string('navshowallcourses', 'admin'), new lang_string('confignavshowallcourses', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('navexpandmycourses', new lang_string('navexpandmycourses', 'admin'), new lang_string('navexpandmycourses_desc', 'admin'), 1));
$sortoptions = array(
'sortorder' => new lang_string('sort_sortorder', 'admin'),
'fullname' => new lang_string('sort_fullname', 'admin'),
......
......@@ -325,7 +325,7 @@ Feature: Set up contextual data for tests
And I am on site homepage
And I follow "Courses"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
......@@ -349,7 +349,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
Then I should see "Test Grade Item 1"
......@@ -380,7 +380,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I follow "Scales"
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
......@@ -432,7 +432,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
Then I should see "Test Outcome Grade Item 1"
......
......@@ -52,13 +52,13 @@ Feature: Edit capabilities
| Forum name | I'm the name |
| Description | I'm the introduction |
And I follow "I'm the name"
And I follow "Permissions"
And I navigate to "Permissions" node in "Forum administration"
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
| 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 "region-main" "region"
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
......@@ -37,7 +37,7 @@ Feature: Verify that all form fields values can be get and set
And I expand "Appearance" node
And I am on site homepage
And I follow "Course 1"
And I follow "Reset"
And I navigate to "Reset" node in "Course administration"
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles"
......
......@@ -8,7 +8,7 @@ Feature: Forms manipulation
Scenario: Basic forms manipulation
Given I log in as "admin"
And I follow "Preferences" in the user menu
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
When I set the field "First name" to "Field value"
And I set the field "Select a country" to "Japan"
And I set the field "Unmask" to "1"
......
......@@ -11,14 +11,14 @@ Feature: Transform steps arguments
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Preferences" in the user menu
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
And I set the field "Description" to "$NASTYSTRING2"
And I set the field "City/town" to "$NASTYSTRING3"
And I press "Update profile"
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Surname" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
......@@ -29,7 +29,7 @@ Feature: Transform steps arguments
| Description | $NASTYSTRING2 |
| City/town | $NASTYSTRING3 |
And I press "Update profile"
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
# BEHAT Transformation regression - See MDL-56397
#And the field "Surname" matches value "$NASTYSTRING1"
......@@ -41,7 +41,7 @@ Feature: Transform steps arguments
| Description | va\"lue2 |
And I set the field "City/town" to "va\"lue3"
And I press "Update profile"
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "First name" matches value "va\"lue1"
And the field "Description" matches value "va\\"lue2"
......@@ -52,7 +52,7 @@ Feature: Transform steps arguments
And I set the following fields to these values:
| Surname | My Surname $NASTYSTRING2 |
And I press "Update profile"
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And I should see "My Firstname"
And I should see "My Surname"
......
......@@ -41,6 +41,7 @@ Feature: Manage competencies linked to evidence of prior learning
Scenario: Link competency to evidence of prior learning from list
Given I follow "Evidence of prior learning"
And I change window size to "large"
And I should see "List of evidence"
And I should see "Test-Evidence"
And I click on "Link" of edit menu in the "Test-Evidence" row
......
......@@ -147,7 +147,7 @@ Feature: tool_monitor_subscriptions
When I follow "Event monitoring"
And I set the field "Select a course" to "Course 1"
Then I should see "You can manage rules from the Event monitoring rules page."
And I follow "Event monitoring rules"
And I click on "Event monitoring rules" "link" in the "region-main" "region"
And I should see "You can subscribe to rules from the Event monitoring page."
And I log out
And I log in as "teacher1"
......@@ -155,7 +155,7 @@ Feature: tool_monitor_subscriptions
And I follow "Event monitoring"
And I set the field "Select a course" to "Course 1"
And I should see "You can manage rules from the Event monitoring rules page."
And I follow "Event monitoring rules"
And I click on "Event monitoring rules" "link" in the "region-main" "region"
And I should see "You can subscribe to rules from the Event monitoring page."
And I click on "//a[text()='Event monitoring']" "xpath_element"
And the field "courseid" matches value "Course 1"
......
......@@ -58,12 +58,12 @@ Feature: Backup user data
And I follow "Course 1"
And I turn editing mode on
And I delete "Quiz 1" activity
And I follow "Recycle bin"
And I navigate to "Recycle bin" node in "Course administration"
And I should see "Quiz 1"
And I follow "Restore"
And I click on "Restore" "link" in the "region-main" "region"
And I log out
And I log in as "student1"
And I follow "Course 1"
When I navigate to "Grades" node in "Course administration"
When I click on "Grades" "link" in the "Navigation" "block"
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
......@@ -31,10 +31,10 @@ Feature: Basic recycle bin functionality
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity
When I follow "Recycle bin"
When I navigate to "Recycle bin" node in "Course administration"
Then I should see "Test assign"
And I should see "Contents will be permanently deleted after 7 days"
And I follow "Restore"
And I click on "Restore" "link" in the "region-main" "region"
And I should see "'Test assign' has been restored"
And I wait to be redirected
And I am on homepage
......@@ -51,10 +51,10 @@ Feature: Basic recycle bin functionality
And I press "Continue"
And I go to the courses management page
And I should not see "Course 2" in the "#course-listing" "css_element"
When I follow "Recycle bin"
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
Then I should see "Course 2"
And I should see "Contents will be permanently deleted after 14 days"
And I follow "Restore"
And I click on "Restore" "link" in the "region-main" "region"
And I should see "'Course 2' has been restored"
And I wait to be redirected
And I go to the courses management page
......@@ -69,7 +69,7 @@ Feature: Basic recycle bin functionality
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity
And I follow "Recycle bin"
And I navigate to "Recycle bin" node in "Course administration"
When I click on "Delete" "link"
Then I should see "Are you sure you want to delete the selected item from the recycle bin?"
And I press "Cancel"
......@@ -92,7 +92,7 @@ Feature: Basic recycle bin functionality
| Description | Test 2 |
And I delete "Test assign 1" activity
And I delete "Test assign 2" activity
And I follow "Recycle bin"
And I navigate to "Recycle bin" node in "Course administration"
And I should see "Test assign 1"
And I should see "Test assign 2"
When I click on "Delete all" "link"
......
......@@ -67,7 +67,7 @@ Feature: Restore Moodle 2 course backups
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name |
| Description | Test forum post backup description |
And I follow "Restore"
And I navigate to "Restore" node in "Course administration"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Section 3 | 0 |
Then I should see "Course 1"
......@@ -91,6 +91,7 @@ Feature: Restore Moodle 2 course backups
| id_startdate_month | January |
| id_startdate_year | 2020 |
| id_format | Weekly format |
| id_enddate_enabled | 0 |
And I press "Save and display"
And I should see "1 January - 7 January"
And I should see "Test forum name"
......
......@@ -32,7 +32,7 @@ Feature: Award badges
And I press "Continue"
And I click on "Admin User" "link"
And I choose "Profile" in the open action menu
And I follow "Edit profile"
And I click on "Edit profile" "link" in the "region-main" "region"
And I expand all fieldsets
And I set the field "Phone" to "123456789"
And I press "Update profile"
......@@ -113,7 +113,7 @@ Feature: Award badges
And I log out
And I log in as "student1"
And I follow "Profile" in the user menu
And I follow "Course 1"
And I click on "Course 1" "link" in the "region-main" "region"
And I should see "Course Badge"
@javascript
......@@ -131,7 +131,7 @@ Feature: Award badges
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
......@@ -156,13 +156,13 @@ Feature: Award badges
And I log out
And I log in as "student1"
And I follow "Profile" in the user menu
And I follow "Course 1"
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
And I follow "Course 1"
And I press "Mark as complete: Test assignment name"
And I follow "Profile" in the user menu
And I follow "Course 1"
And I click on "Course 1" "link" in the "region-main" "region"
Then I should see "Course Badge"
@javascript
......@@ -180,7 +180,7 @@ Feature: Award badges
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
......@@ -189,7 +189,7 @@ Feature: Award badges
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I follow "Course completion"
And I navigate to "Course completion" node in "Course administration"
And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link"
And I set the field "Assignment - Test assignment name" to "1"
......@@ -211,7 +211,7 @@ Feature: Award badges
And I log out
And I log in as "student1"
And I follow "Profile" in the user menu
And I follow "Course 1"
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
And I follow "Course 1"
......@@ -300,14 +300,14 @@ Feature: Award badges
# Student 1 should have just course badge 1.
And I log in as "student1"
And I follow "Profile" in the user menu
When I follow "Course 1"
When I click on "Course 1" "link" in the "region-main" "region"
Then I should see "Course Badge 1"
And I should not see "Course Badge 2"
And I log out
# Student 2 should have just course badge 2.
And I log in as "student2"
And I follow "Profile" in the user menu
When I follow "Course 1"
When I click on "Course 1" "link" in the "region-main" "region"
Then I should see "Course Badge 2"
Then I should not see "Course Badge 1"
......
......@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
And I press "Save and return to course"
And I follow "Course 1"
And I should see "Test page name"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
......
......@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
......@@ -167,4 +167,4 @@ Feature: The activity results block displays student scores
Then I should see "User" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
And I should see "80.00%" in the "Activity results" "block"
And I should see "70.00%" in the "Activity results" "block"
\ No newline at end of file
And I should see "70.00%" in the "Activity results" "block"
......@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
......@@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
......
......@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
......@@ -60,7 +60,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
......
......@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
......@@ -225,4 +225,4 @@ Feature: The activity results block displays student scores
And I follow "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "100.00%" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
\ No newline at end of file
And I should see "90.00%" in the "Activity results" "block"
......@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
......@@ -202,4 +202,4 @@ Feature: The activity results block displays student scores
And I should see "Group" in the "Activity results" "block"
And I should see "95.00%" in the "Activity results" "block"
And I should see "85.00%" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
\ No newline at end of file
And I should see "75.00%" in the "Activity results" "block"
......@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
......@@ -156,4 +156,4 @@ Feature: The activity results block displays student scores
Then I should see "User" in the "Activity results" "block"
And I should see "50.00%" in the "Activity results" "block"
And I should see "60.00%" in the "Activity results" "block"
And I should see "70.00%" in the "Activity results" "block"
\ No newline at end of file
And I should see "70.00%" in the "Activity results" "block"
......@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
......@@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I click on "Grades" "link" in the "Navigation" "block"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment