diff --git a/admin/tool/behat/tests/behat/get_and_set_fields.feature b/admin/tool/behat/tests/behat/get_and_set_fields.feature index 9edf445d769..b867c582c51 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -60,9 +60,9 @@ Feature: Verify that all form fields values can be get and set | HTML format | Student page contents | And I press "Save" Then I should see "Student page contents" in the "region-main" "region" - And I follow "Edit" + And I click on "Edit" "link" in the "Administration" "block" # Select (multi-select) - Checking "I set the field". - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets # Checkbox - Checking "I set the field". And I set the field "Display description on course page" to "1" @@ -75,7 +75,7 @@ Feature: Verify that all form fields values can be get and set And I press "Save and return to course" And I should see "Test this one" And I follow "Test this one" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" # Checkbox - Checking "the field matches value" and "the following fields match these values". And the following fields match these values: | Display description on course page | 1 | @@ -91,7 +91,7 @@ Feature: Verify that all form fields values can be get and set # Select (simple) - Checking "I set the field". And I set the field "Group mode" to "Separate groups" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And the following fields match these values: | Default format | NWiki | | Group mode | Separate groups | @@ -158,7 +158,7 @@ Feature: Verify that all form fields values can be get and set And the "available[day]" "field" should be enabled And the field "deadline[enabled]" matches value "1" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And the field "available[enabled]" matches value "1" And the "available[day]" "field" should be enabled And the field "deadline[enabled]" matches value "1" diff --git a/availability/condition/grade/tests/behat/availability_grade.feature b/availability/condition/grade/tests/behat/availability_grade.feature index e987ed3259c..df3340e9fa1 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -115,7 +115,7 @@ Feature: availability_grade # Give the assignment 40%. And I follow "A1" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" # Pick the grade link in the row that has s@example.com in it. And I click on "Grade" "link" in the "s@example.com" "table_row" And I set the field "Grade out of 100" to "40" diff --git a/completion/tests/behat/restrict_activity_by_grade.feature b/completion/tests/behat/restrict_activity_by_grade.feature index 89ef52127fa..a42b23c3ec8 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -56,7 +56,7 @@ Feature: Restrict activity availability through grade conditions And I am on site homepage And I follow "Course 1" And I follow "Grade assignment" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student First" "table_row" And I set the following fields to these values: | Grade | 21 | diff --git a/completion/tests/behat/restrict_section_availability.feature b/completion/tests/behat/restrict_section_availability.feature index 7e0eeec7d5b..5090562e99e 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -93,7 +93,7 @@ Feature: Restrict sections availability through completion or grade conditions And I am on site homepage And I follow "Course 1" And I follow "Grade assignment" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student First" "table_row" And I set the following fields to these values: | Grade | 21 | diff --git a/course/tests/behat/activities_edit_completion.feature b/course/tests/behat/activities_edit_completion.feature index 50878cc00d9..1eb0f5f2b2f 100644 --- a/course/tests/behat/activities_edit_completion.feature +++ b/course/tests/behat/activities_edit_completion.feature @@ -35,24 +35,24 @@ Feature: Edit completion settings of an activity @javascript Scenario: Pressing the unlock button allows the user to edit completion settings Given I follow "TestPage" - When I follow "Edit settings" + When I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I press "Unlock completion options" Then I should see "Completion options unlocked" And I set the field "Completion tracking" to "Students can manually mark the activity as completed" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets Then the field "Completion tracking" matches value "Students can manually mark the activity as completed" @javascript Scenario: Even when completion is locked, the user can still set the date Given I follow "TestPage" - And I follow "Edit settings" + When I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets When I click on "id_completionexpected_enabled" "checkbox" And I set the field "id_completionexpected_year" to "2013" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets Then the field "id_completionexpected_year" matches value "2013" diff --git a/grade/grading/form/guide/tests/behat/edit_guide.feature b/grade/grading/form/guide/tests/behat/edit_guide.feature index f043693e559..0181a86d5d4 100644 --- a/grade/grading/form/guide/tests/behat/edit_guide.feature +++ b/grade/grading/form/guide/tests/behat/edit_guide.feature @@ -87,7 +87,7 @@ Feature: Marking guides can be created and edited And I press "Ok" And I follow "Edit settings" And I follow "Test assignment 1 name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" # Checking that the user grade is correct. Then I should see "80" in the "Student 1" "table_row" And I log out diff --git a/grade/grading/tests/behat/behat_grading.php b/grade/grading/tests/behat/behat_grading.php index 0ee77e5f90c..c4c9307e530 100644 --- a/grade/grading/tests/behat/behat_grading.php +++ b/grade/grading/tests/behat/behat_grading.php @@ -49,7 +49,13 @@ class behat_grading extends behat_base { $this->execute('behat_general::click_link', $this->escape($activityname)); - $this->execute('behat_general::click_link', get_string('gradingmanagement', 'grading')); + $this->execute('behat_general::i_click_on_in_the', + array( + get_string('gradingmanagement', 'grading'), + 'link', + 'Administration', + 'block' + )); } /** @@ -86,7 +92,13 @@ class behat_grading extends behat_base { $this->execute('behat_general::click_link', $this->escape($activityname)); - $this->execute('behat_general::click_link', $this->escape(get_string('viewgrading', 'assign'))); + $this->execute('behat_general::i_click_on_in_the', + array( + get_string('viewgrading', 'mod_assign'), + 'link', + 'Administration', + 'block' + )); $this->execute('behat_general::i_click_on_in_the', array( @@ -157,7 +169,13 @@ class behat_grading extends behat_base { $this->execute('behat_forms::press_button', 'Ok'); $this->execute('behat_general::i_click_on', array($this->escape(get_string('editsettings')), 'link')); $this->execute('behat_forms::press_button', get_string('cancel')); - $this->execute('behat_general::i_click_on', array($this->escape(get_string('viewgrading', 'mod_assign')), 'link')); + $this->execute('behat_general::i_click_on_in_the', + array( + get_string('viewgrading', 'mod_assign'), + 'link', + 'Administration', + 'block' + )); } /** diff --git a/grade/report/singleview/tests/behat/bulk_insert_grades.feature b/grade/report/singleview/tests/behat/bulk_insert_grades.feature index 9b40f473022..608f98ad0d9 100644 --- a/grade/report/singleview/tests/behat/bulk_insert_grades.feature +++ b/grade/report/singleview/tests/behat/bulk_insert_grades.feature @@ -33,7 +33,7 @@ Feature: We can bulk insert grades for students in a course Given I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | @@ -74,7 +74,7 @@ Feature: We can bulk insert grades for students in a course Given I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment two" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | diff --git a/grade/tests/behat/grade_point_maximum.feature b/grade/tests/behat/grade_point_maximum.feature index c750f819603..823c8eda325 100644 --- a/grade/tests/behat/grade_point_maximum.feature +++ b/grade/tests/behat/grade_point_maximum.feature @@ -25,7 +25,7 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Validate that switching the type of grading used correctly disables input form elements When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Point" Then the "Scale" "select" should be disabled @@ -41,12 +41,12 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with a maximum grade point value less than the system maximum When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "point" And I set the field "grade[modgrade_point]" to "600" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" Then the field "grade[modgrade_point]" matches value "600" And the "Scale" "select" should be disabled And I press "Save and return to course" @@ -54,12 +54,12 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with a scale as the grade type When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing" And the "Maximum grade" "field" should be disabled And I press "Save and return to course" @@ -67,18 +67,18 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with no grade as the grade type When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "None" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And the "Scale" "select" should be disabled And the "Maximum grade" "field" should be disabled And I press "Save and return to course" Scenario: Create an activity with a maximum grade point value higher than the system maximum When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Point" And I set the field "grade[modgrade_point]" to "20000" @@ -88,7 +88,7 @@ Feature: We can change the grading type and maximum grade point values Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower When I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "point" And I set the field "grade[modgrade_point]" to "600" @@ -100,7 +100,7 @@ Feature: We can change the grading type and maximum grade point values And I am on site homepage And I follow "Course 1" And I follow "Test Assignment 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I press "Save and display" Then I should see "Invalid grade value. This must be an integer between 1 and 100" And I press "Cancel" diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index c63a8047974..b89b67cc615 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -44,12 +44,12 @@ Feature: View gradebook when scales are used And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Letterscale" And I press "Save and display" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "A" And I press "Save changes" diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 9a5f78a5fce..76a2b349aa4 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -38,12 +38,12 @@ Feature: View gradebook when single item scales are used And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Singleitem" And I press "Save and display" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "A" And I press "Save changes" diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index f30f2edf8ec..80336c91298 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -111,7 +111,7 @@ Feature: Using the activity grade form element # Try saving the form and visiting it back to verify that everything is working ok. And I press "Save and display" And I should not see "When selecting a ratings aggregate type you must also select" - And I click on "Edit settings" "link" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And the field "Aggregate type" matches value "Average of ratings" And the field "scale[modgrade_type]" matches value "Scale" @@ -142,17 +142,17 @@ Feature: Using the activity grade form element | grade[modgrade_scale] | ABCDEF | And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "C" And I press "Save changes" And I press "Ok" - And I click on "Edit settings" "link" + And I click on "Edit settings" "link" in the "Administration" "block" When I expand all fieldsets Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" # Try saving the form and visiting it back to verify everything is working ok. And I press "Save and display" - And I click on "Edit settings" "link" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And the field "grade[modgrade_type]" matches value "Scale" And the field "grade[modgrade_scale]" matches value "ABCDEF" @@ -202,11 +202,11 @@ Feature: Using the activity grade form element | Description | Test assignment description | And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" And I press "Ok" - And I click on "Edit settings" "link" + And I click on "Edit settings" "link" in the "Administration" "block" When I expand all fieldsets Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." diff --git a/mod/assign/feedback/file/tests/behat/feedback_file.feature b/mod/assign/feedback/file/tests/behat/feedback_file.feature index 0cad53e21df..657d4e837b7 100644 --- a/mod/assign/feedback/file/tests/behat/feedback_file.feature +++ b/mod/assign/feedback/file/tests/behat/feedback_file.feature @@ -34,7 +34,7 @@ Feature: In an assignment, teacher can submit feedback files during grading | Maximum number of uploaded files | 2 | | Students submit in groups | Yes | And I follow "Test assignment name" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I follow "Expand all" And I set the field "assignfeedback_file_enabled" to "1" And I press "Save and display" diff --git a/mod/assign/tests/behat/allow_another_attempt.feature b/mod/assign/tests/behat/allow_another_attempt.feature index 77154ae5412..3f81e9425f2 100644 --- a/mod/assign/tests/behat/allow_another_attempt.feature +++ b/mod/assign/tests/behat/allow_another_attempt.feature @@ -38,7 +38,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Allow another attempt | 1 | @@ -55,7 +55,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I should see "I'm the student first submission" @@ -112,7 +112,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should contain "No submission" diff --git a/mod/assign/tests/behat/comment_inline.feature b/mod/assign/tests/behat/comment_inline.feature index 73a4c1d69cc..24951cbce01 100644 --- a/mod/assign/tests/behat/comment_inline.feature +++ b/mod/assign/tests/behat/comment_inline.feature @@ -40,7 +40,7 @@ Feature: In an assignment, teachers can edit a students submission inline When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | @@ -50,7 +50,7 @@ Feature: In an assignment, teachers can edit a students submission inline And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "50.00" in the "Student 1" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" And I should see "Graded" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/display_error_message_onbadformat.feature b/mod/assign/tests/behat/display_error_message_onbadformat.feature index feae3bc0649..456edd850fb 100644 --- a/mod/assign/tests/behat/display_error_message_onbadformat.feature +++ b/mod/assign/tests/behat/display_error_message_onbadformat.feature @@ -28,7 +28,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I follow "View all submissions" + Then I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50,,6" And I press "Save changes" @@ -58,7 +58,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I follow "View all submissions" + Then I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50..6" And I press "Save changes" diff --git a/mod/assign/tests/behat/display_grade.feature b/mod/assign/tests/behat/display_grade.feature index 49c03c0b78c..61bdebeab9e 100644 --- a/mod/assign/tests/behat/display_grade.feature +++ b/mod/assign/tests/behat/display_grade.feature @@ -28,14 +28,14 @@ Feature: Check that the assignment grade can be updated correctly | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I follow "View all submissions" + Then I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" @javascript @@ -64,12 +64,12 @@ Feature: Check that the assignment grade can be updated correctly | Students submit in groups | Yes | | Group mode | No groups | When I follow "Test assignment name" - Then I follow "View all submissions" + Then I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index 1c1f38f3793..087fe9c1079 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -40,7 +40,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 2" "table_row" And I set the following fields to these values: | Grade | 49 | @@ -58,7 +58,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 2" "table_row" And I click on "View a different attempt" "link" And I click on "//div[contains(concat(' ', normalize-space(@class), ' '), ' confirmation-dialogue ')]//input[@value='0']" "xpath_element" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index 0028337ceb6..33d970763bb 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -36,18 +36,18 @@ Feature: In an assignment, the administrator can edit students' submissions And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | Have you seen the movie Chef? | And I press "Save changes" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "Have you seen the movie Chef?" And I click on "Edit" "link" in the "Student 1" "table_row" And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | I have seen the movie chef. | And I press "Save changes" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "I have seen the movie chef." diff --git a/mod/assign/tests/behat/filter_by_marker.feature b/mod/assign/tests/behat/filter_by_marker.feature index 864777db6ce..b80f514de61 100644 --- a/mod/assign/tests/behat/filter_by_marker.feature +++ b/mod/assign/tests/behat/filter_by_marker.feature @@ -32,7 +32,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned | Use marking workflow | Yes | | Use marking allocation | Yes | And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "allocatedmarker" to "Marker 1" And I press "Save changes" @@ -42,7 +42,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I set the field "markerfilter" to "Marker 1" Then I should see "Student 1" And I should not see "Student 2" diff --git a/mod/assign/tests/behat/grading_status.feature b/mod/assign/tests/behat/grading_status.feature index 27f95d80e44..1f4c22af0c6 100644 --- a/mod/assign/tests/behat/grading_status.feature +++ b/mod/assign/tests/behat/grading_status.feature @@ -50,7 +50,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Not marked" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" @@ -60,7 +60,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "In review" in the "Student 1" "table_row" And I log out # View the grading status as a student. @@ -77,7 +77,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "In review" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Marking workflow state" to "Released" @@ -85,7 +85,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Released" in the "Student 1" "table_row" And I log out # View the grading status as a student. @@ -102,7 +102,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Released" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Marking workflow state" to "In marking" @@ -110,7 +110,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "In marking" in the "Student 1" "table_row" # The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty. And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" @@ -146,7 +146,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should not see "Graded" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" @@ -155,7 +155,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Graded" in the "Student 1" "table_row" And I log out # View the grading status as a student. diff --git a/mod/assign/tests/behat/grant_extension.feature b/mod/assign/tests/behat/grant_extension.feature index 4834536942a..b45e2bba413 100644 --- a/mod/assign/tests/behat/grant_extension.feature +++ b/mod/assign/tests/behat/grant_extension.feature @@ -35,7 +35,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Grant extension" And I should see "Student 1 (student1@example.com)" @@ -56,7 +56,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I set the field "selectall" to "1" And I set the field "operation" to "Grant extension" And I click on "Go" "button" confirming the dialogue @@ -88,7 +88,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Grant extension" And I should see "Student 1 (student1@example.com)" @@ -110,7 +110,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I set the field "selectall" to "1" And I set the field "operation" to "Grant extension" And I click on "Go" "button" confirming the dialogue diff --git a/mod/assign/tests/behat/group_submission.feature b/mod/assign/tests/behat/group_submission.feature index 6717db35a40..4826a18742a 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -35,7 +35,7 @@ Feature: Group assignment submissions | Students submit in groups | Yes | | Group mode | No groups | And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" Then "//tr[contains(., 'Student 0')][contains(., 'Default group')]" "xpath_element" should exist And "//tr[contains(., 'Student 1')][contains(., 'Default group')]" "xpath_element" should exist And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist @@ -54,7 +54,7 @@ Feature: Group assignment submissions And I add "Student 1 (student1@example.com)" user to "Group 1" group members And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist And I should not see "Student 2" @@ -113,7 +113,7 @@ Feature: Group assignment submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading" @@ -130,7 +130,7 @@ Feature: Group assignment submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index a008b17879d..952c65b60e6 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -62,7 +62,7 @@ Feature: Outcome grading When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 0" "table_row" And I set the following fields to these values: | Outcome Test: | Excellent | @@ -70,7 +70,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row" @@ -112,7 +112,7 @@ Feature: Outcome grading When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 0" "table_row" And I set the following fields to these values: | Outcome Test: | Excellent | @@ -121,7 +121,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should see "Outcome Test: Excellent" in the "Student 1" "table_row" And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row" @@ -133,7 +133,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row" And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row" diff --git a/mod/assign/tests/behat/prevent_submission_changes.feature b/mod/assign/tests/behat/prevent_submission_changes.feature index d519c6f8772..c12760483f7 100644 --- a/mod/assign/tests/behat/prevent_submission_changes.feature +++ b/mod/assign/tests/behat/prevent_submission_changes.feature @@ -45,7 +45,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Prevent submission changes" Then I should see "Submission changes not allowed" @@ -59,7 +59,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Allow submission changes" And I should not see "Submission changes not allowed" @@ -98,7 +98,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I follow "View all submissions" + When I click on "View all submissions" "link" in the "Administration" "block" And I set the field "selectall" to "1" And I click on "Go" "button" confirming the dialogue Then I should see "Submission changes not allowed" in the "Student 1" "table_row" @@ -112,7 +112,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I set the field "selectall" to "1" And I set the field "id_operation" to "Unlock submissions" And I click on "Go" "button" confirming the dialogue diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index 854325e871a..0b4357aa1f7 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -38,7 +38,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I wait until the page is ready And I press "Save changes" @@ -110,7 +110,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50.0 | @@ -120,7 +120,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I click on "Quick grading" "checkbox" And I set the field "User grade" to "60.0" And I press "Save all quick grading changes" @@ -148,7 +148,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Hide User picture" "link" And I click on "Hide Full name" "link" And I click on "Hide Email address" "link" diff --git a/mod/assign/tests/behat/reopen_locked_submission.feature b/mod/assign/tests/behat/reopen_locked_submission.feature index 22970410d85..63e1638992f 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -41,7 +41,7 @@ Feature: Submissions are unlocked when a new attempt is given And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Prevent submission changes" And I should see "Submission changes not allowed" @@ -76,7 +76,7 @@ Feature: Submissions are unlocked when a new attempt is given And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Edit" "link" in the "Student 1" "table_row" And I follow "Prevent submission changes" And I should see "Submission changes not allowed" diff --git a/mod/assign/tests/behat/rescale_grades.feature b/mod/assign/tests/behat/rescale_grades.feature index 4d861e5d7c5..733fd83b4cd 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -26,46 +26,46 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c | Assignment name | Test assignment name | | Description | Test assignment description | And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "40" And I press "Save changes" And I press "Ok" - And I click on "Edit settings" "link" + And I follow "Edit settings" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And "Student 1" row "Grade" column of "generaltable" table should contain "40.00" Scenario: Update the max grade for an assignment without rescaling existing grades - Given I follow "Edit settings" + Given I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "Rescale existing grades" to "No" And I set the field "Maximum grade" to "80" When I press "Save and display" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" Scenario: Update an assignment without touching the max grades - Given I follow "Edit settings" + Given I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "Rescale existing grades" to "No" And I set the field "Maximum grade" to "80" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I press "Save and display" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "Rescale existing grades" to "Yes" And I set the field "Maximum grade" to "80" When I press "Save and display" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" Scenario: Update the max grade for an assignment rescaling existing grades - Given I follow "Edit settings" + Given I click on "Edit settings" "link" in the "Administration" "block" And I expand all fieldsets And I set the field "Rescale existing grades" to "Yes" And I set the field "Maximum grade" to "50" When I press "Save and display" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then "Student 1" row "Grade" column of "generaltable" table should contain "20.00" diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index 548cf29bc36..a6aa69592a9 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -44,7 +44,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Not marked" in the "I'm the student's first submission" "table_row" And I click on "Grade" "link" in the "I'm the student's first submission" "table_row" And I set the field "Grade out of 100" to "50" @@ -54,7 +54,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "In review" in the "I'm the student's first submission" "table_row" @javascript @@ -65,7 +65,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Ready for release" in the "I'm the student's first submission" "table_row" And I click on "Grade" "link" in the "I'm the student's first submission" "table_row" And I set the field "Marking workflow state" to "Released" @@ -73,7 +73,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Released" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" @@ -93,7 +93,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Ready for release" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" @@ -103,7 +103,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Released" in the "Student 1" "table_row" And I log out And I log in as "student1" diff --git a/mod/assign/tests/behat/submission_comments.feature b/mod/assign/tests/behat/submission_comments.feature index 9e264607185..4d8fd4291a1 100644 --- a/mod/assign/tests/behat/submission_comments.feature +++ b/mod/assign/tests/behat/submission_comments.feature @@ -52,7 +52,7 @@ Feature: In an assignment, students can comment in their submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" When I set the following fields to these values: | Grade out of 100 | 50 | @@ -61,7 +61,7 @@ Feature: In an assignment, students can comment in their submissions And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" Then I should see "50.00" in the "Student 1" "table_row" And I should see "I'm the teacher feedback" in the "Student 1" "table_row" @@ -72,7 +72,7 @@ Feature: In an assignment, students can comment in their submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 0 | diff --git a/mod/assign/tests/behat/submit_without_group.feature b/mod/assign/tests/behat/submit_without_group.feature index 0b75efbfd46..af7826bc39c 100644 --- a/mod/assign/tests/behat/submit_without_group.feature +++ b/mod/assign/tests/behat/submit_without_group.feature @@ -90,7 +90,7 @@ Feature: Submit assignment without group And I follow "Allow default group" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Default group" in the "Student 1" "table_row" And I should see "Default group" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" @@ -100,7 +100,7 @@ Feature: Submit assignment without group And I follow "Require group membership" And I should see "0" in the "Groups" "table_row" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Not a member of any group, so unable to make submissions." in the "Student 1" "table_row" And I should see "Not a member of any group, so unable to make submissions." in the "Student 2" "table_row" And I should not see "Submitted for grading" in the "Student 1" "table_row" @@ -110,7 +110,7 @@ Feature: Submit assignment without group And I follow "Require group membership" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Group 1" in the "Student 1" "table_row" And I should see "Group 1" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" @@ -128,5 +128,5 @@ Feature: Submit assignment without group And I follow "Course 3" And I follow "Require group membership" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I follow "View all submissions" + And I click on "View all submissions" "link" in the "Administration" "block" And I should see "Member of more than one group, so unable to make submissions." in the "Student 3" "table_row" diff --git a/mod/book/tests/behat/show_hide_chapters.feature b/mod/book/tests/behat/show_hide_chapters.feature index 6fa7efc6b84..47e45faa563 100644 --- a/mod/book/tests/behat/show_hide_chapters.feature +++ b/mod/book/tests/behat/show_hide_chapters.feature @@ -52,7 +52,7 @@ Feature: Book activity chapter visibility management Scenario: Show/hide chapters and subchapters When I follow "Hide chapter \"2. Second chapter\"" And I follow "Hide chapter \"2. Third chapter\"" - And I follow "Turn editing off" + And I turn editing mode off And I am on homepage And I follow "Course 1" And I follow "Test book" @@ -63,7 +63,7 @@ Feature: Book activity chapter visibility management And I follow "Exit book" And I follow "Test book" And I should see "First chapter" in the ".book_content" "css_element" - And I follow "Turn editing on" + And I turn editing mode on And I follow "Next" And I should see "Second chapter" in the ".book_content" "css_element" And I should not see "Exit book" diff --git a/mod/choice/tests/behat/modify_choice.feature b/mod/choice/tests/behat/modify_choice.feature index 9441b8bfc9c..22beb92e998 100644 --- a/mod/choice/tests/behat/modify_choice.feature +++ b/mod/choice/tests/behat/modify_choice.feature @@ -35,7 +35,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I follow "View 1 responses" + And I click on "View 1 responses" "link" in the "Administration" "block" And I click on "Student 1 Option 1" "checkbox" And I select "Delete" from the "With selected" singleselect And "Student 1 Option 1" "checkbox" should not exist @@ -53,7 +53,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I follow "View 1 responses" + And I click on "View 1 responses" "link" in the "Administration" "block" And I click on "Student 1 Option 1" "checkbox" And I click on "Student 2 Not answered yet" "checkbox" And I click on "Student 3 Not answered yet" "checkbox" @@ -71,7 +71,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I set the field "Allow more than one choice to be selected" to "Yes" And I press "Save and return to course" And I log out @@ -107,7 +107,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I set the following fields to these values: | Publish results | Always show results to students | | Privacy of results | Publish full results, showing names and their choices | diff --git a/mod/data/tests/behat/add_entries.feature b/mod/data/tests/behat/add_entries.feature index 496bbdbcfd4..51807833a98 100644 --- a/mod/data/tests/behat/add_entries.feature +++ b/mod/data/tests/behat/add_entries.feature @@ -30,6 +30,7 @@ Feature: Users can add entries to database activities | Field description | Test field 2 description | # To generate the default templates. And I follow "Templates" + And I wait until the page is ready And I log out When I log in as "student1" And I follow "Course 1" diff --git a/mod/data/tests/behat/behat_mod_data.php b/mod/data/tests/behat/behat_mod_data.php index bd7acff15d2..da2abdd06dd 100644 --- a/mod/data/tests/behat/behat_mod_data.php +++ b/mod/data/tests/behat/behat_mod_data.php @@ -50,7 +50,8 @@ class behat_mod_data extends behat_base { public function i_add_a_field_to_database_and_i_fill_the_form_with($fieldtype, $activityname, TableNode $fielddata) { $this->execute("behat_general::click_link", $this->escape($activityname)); - $this->execute("behat_general::click_link", get_string('fields', 'mod_data')); + $this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('fields', 'mod_data'), + get_string('pluginadministration', 'mod_data'))); $this->execute('behat_forms::i_set_the_field_to', array('newtype', $this->escape($fieldtype))); @@ -75,7 +76,8 @@ class behat_mod_data extends behat_base { public function i_add_an_entry_to_database_with($activityname, TableNode $entrydata) { $this->execute("behat_general::click_link", $this->escape($activityname)); - $this->execute("behat_general::click_link", get_string('add', 'mod_data')); + $this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('add', 'mod_data'), + get_string('pluginadministration', 'mod_data'))); $this->execute("behat_forms::i_set_the_following_fields_to_these_values", $entrydata); } diff --git a/mod/feedback/tests/behat/anonymous.feature b/mod/feedback/tests/behat/anonymous.feature index 70adbe3f840..499bf056cfc 100644 --- a/mod/feedback/tests/behat/anonymous.feature +++ b/mod/feedback/tests/behat/anonymous.feature @@ -101,7 +101,7 @@ Feature: Anonymous feedback And I log in as "manager" And I am on site homepage And I navigate to "Site feedback" node in "Site pages" - And I follow "Show responses" + And I click on "Show responses" "link" in the "Administration" "block" And I should not see "Username" And I should see "Anonymous entries (2)" And I follow "Response number: 1" @@ -166,7 +166,7 @@ Feature: Anonymous feedback And I log in as "manager" And I am on site homepage And I navigate to "Site feedback" node in "Site pages" - And I follow "Show responses" + And I click on "Show responses" "link" in the "Administration" "block" And I should see "Anonymous entries (2)" And I follow "Response number: 1" And I should see "Response number: 1 (Anonymous)" @@ -225,7 +225,7 @@ Feature: Anonymous feedback And I should see "Do you like this course?" And I press "Continue" And I should not see "Answer the questions..." - And I follow "Show responses" + And I click on "Show responses" "link" in the "Administration" "block" And I should not see "Username" And I should see "Anonymous entries (2)" And I follow "Response number: 1" diff --git a/mod/feedback/tests/behat/coursemapping.feature b/mod/feedback/tests/behat/coursemapping.feature index fbb80664243..dc2bee3d538 100644 --- a/mod/feedback/tests/behat/coursemapping.feature +++ b/mod/feedback/tests/behat/coursemapping.feature @@ -114,7 +114,7 @@ Feature: Mapping courses in a feedback And I am on site homepage And I navigate to "Course feedback" node in "Site pages" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback And I should see "1 (33.33 %)" in the "option a" "table_row" @@ -197,7 +197,7 @@ Feature: Mapping courses in a feedback And I log in as "manager" And I am on site homepage And I navigate to "Course feedback" node in "Site pages" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback And I should see "0" in the "option a" "table_row" diff --git a/mod/feedback/tests/behat/groups.feature b/mod/feedback/tests/behat/groups.feature index 359e17fc989..b5cbd15340c 100644 --- a/mod/feedback/tests/behat/groups.feature +++ b/mod/feedback/tests/behat/groups.feature @@ -139,7 +139,7 @@ Feature: Feedbacks in courses with groups And I log in as "teacher" And I follow "Course 1" And I follow "Course feedback" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback And I should see "2 (28.57 %)" in the "Yes of course" "table_row" @@ -249,7 +249,7 @@ Feature: Feedbacks in courses with groups And I log in as "teacher" And I follow "Course 1" And I follow "Course anon feedback" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback And I should see "2 (28.57 %)" in the "Yes of course" "table_row" diff --git a/mod/feedback/tests/behat/multichoice.feature b/mod/feedback/tests/behat/multichoice.feature index 3468d1bbcc5..84773eaa6e6 100644 --- a/mod/feedback/tests/behat/multichoice.feature +++ b/mod/feedback/tests/behat/multichoice.feature @@ -141,7 +141,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -162,7 +162,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should not see "%" in the "option b" "table_row" @@ -285,7 +285,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -306,7 +306,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should see "1 (100.00 %)" in the "option b" "table_row" @@ -408,7 +408,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -429,7 +429,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should not see "%" in the "option b" "table_row" diff --git a/mod/feedback/tests/behat/non_anonymous.feature b/mod/feedback/tests/behat/non_anonymous.feature index 98419388450..ef2cf7f4961 100644 --- a/mod/feedback/tests/behat/non_anonymous.feature +++ b/mod/feedback/tests/behat/non_anonymous.feature @@ -96,7 +96,7 @@ Feature: Non anonymous feedback And I log in as "manager" And I am on site homepage And I navigate to "Site feedback" node in "Site pages" - And I follow "Show responses" + And I click on "Show responses" "link" in the "Administration" "block" And I should see "Username" And I should see "Non anonymous entries (2)" And I should not see "Anonymous entries" @@ -152,7 +152,7 @@ Feature: Non anonymous feedback And I should see "Do you like this course?" And I press "Continue" And I should not see "Answer the questions..." - And I follow "Show responses" + And I click on "Show responses" "link" in the "Administration" "block" And I should see "Non anonymous entries (2)" And I should not see "Anonymous" And I click on "," "link" in the "Username 1" "table_row" diff --git a/mod/feedback/tests/behat/question_types.feature b/mod/feedback/tests/behat/question_types.feature index 96206aa6dc1..ab60b34f459 100644 --- a/mod/feedback/tests/behat/question_types.feature +++ b/mod/feedback/tests/behat/question_types.feature @@ -99,14 +99,14 @@ Feature: Test creating different types of feedback questions for anonymous feedb When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "Submitted answers: 2" And I should see "Questions: 8" And I log out And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "C1" in the "(info)" "table" And I should see "my long answer" in the "(longertext)" "table" And I should see "lots of feedbacks" in the "(longertext)" "table" diff --git a/mod/feedback/tests/behat/question_types_non_anon.feature b/mod/feedback/tests/behat/question_types_non_anon.feature index 51d2ef2ac9d..b107d5c57bb 100644 --- a/mod/feedback/tests/behat/question_types_non_anon.feature +++ b/mod/feedback/tests/behat/question_types_non_anon.feature @@ -103,14 +103,14 @@ Feature: Test creating different types of feedback questions for non-anonymous f When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "Submitted answers: 2" And I should see "Questions: 9" And I log out And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Analysis" + And I click on "Analysis" "link" in the "Administration" "block" And I should see "C1" in the "(info)" "table" And I should see "my long answer" in the "(longertext)" "table" And I should see "lots of feedbacks" in the "(longertext)" "table" diff --git a/mod/feedback/tests/behat/show_nonrespondents.feature b/mod/feedback/tests/behat/show_nonrespondents.feature index 1d3d63779cb..33dd3e70383 100644 --- a/mod/feedback/tests/behat/show_nonrespondents.feature +++ b/mod/feedback/tests/behat/show_nonrespondents.feature @@ -66,7 +66,7 @@ Feature: Show users who have not responded to the feedback survey And I log in as "teacher1" And I follow "Course 1" And I follow "Frogs" - And I follow "Show non-respondents" + And I click on "Show non-respondents" "link" in the "Administration" "block" # Should only show student 2; not student 1 (they did it) or 3 (not in grouping). Then I should see "Student 2" diff --git a/mod/forum/tests/behat/forum_subscriptions_availability.feature b/mod/forum/tests/behat/forum_subscriptions_availability.feature index 4d8a5df03f7..a6c880b5b4e 100644 --- a/mod/forum/tests/behat/forum_subscriptions_availability.feature +++ b/mod/forum/tests/behat/forum_subscriptions_availability.feature @@ -46,7 +46,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Description | Test forum description | | Subscription mode | Forced subscription | And I follow "Forced Forum 1" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" Then I should see "Student 1" And I should see "Teacher Teacher" And I should see "Student 2" @@ -57,7 +57,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users And I click on "Grouping" "button" in the "Add restriction..." "dialogue" And I set the field with xpath "//select[@name='id']" to "Grouping 1" And I press "Save and display" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" And I should see "Student 1" And I should see "Teacher Teacher" And I should not see "Student 2" @@ -71,7 +71,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Subscription mode | Forced subscription | | Visible | Show | And I follow "Forced Forum 2" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" Then I should see "Teacher Teacher" And I should see "Student 1" And I should see "Student 2" @@ -86,7 +86,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Subscription mode | Forced subscription | | Visible | Hide | And I follow "Forced Forum 2" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" Then I should see "Teacher Teacher" And I should not see "Student 1" And I should not see "Student 2" @@ -100,7 +100,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Description | Test forum description | | Subscription mode | Auto subscription | And I follow "Forced Forum 1" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" Then I should see "Student 1" And I should see "Teacher Teacher" And I should see "Student 2" @@ -111,7 +111,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users And I click on "Grouping" "button" in the "Add restriction..." "dialogue" And I set the field with xpath "//select[@name='id']" to "Grouping 1" And I press "Save and display" - And I follow "Show/edit current subscribers" + And I click on "Show/edit current subscribers" "link" in the "Administration" "block" And I should see "Student 1" And I should see "Teacher Teacher" And I should not see "Student 2" diff --git a/mod/quiz/tests/behat/backup.feature b/mod/quiz/tests/behat/backup.feature index d5b647c6cfb..5d8c75665ac 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -32,7 +32,7 @@ Feature: Backup and restore of quizzes And I duplicate "Quiz 1" activity editing the new copy with: | Name | Quiz 2 | And I follow "Quiz 2" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then I should see "TF1" And I should see "TF2" @@ -46,6 +46,6 @@ Feature: Backup and restore of quizzes And I press "Save changes" And I restore "moodle_28_quiz.mbz" backup into "Course 1" course using this options: And I follow "Restored Moodle 2.8 quiz" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then I should see "TF1" And I should see "TF2" diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index cae2fc4e023..624cf04cd0c 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -192,7 +192,7 @@ Feature: Edit quiz page - adding things # Add Essay 03 from question bank. And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I open the "last" add to quiz menu And I follow "from question bank" And I click on "Add to quiz" "link" in the "Essay 03" "table_row" diff --git a/mod/quiz/tests/behat/editing_move_by_click.feature b/mod/quiz/tests/behat/editing_move_by_click.feature index 955a659493f..a14a67db169 100644 --- a/mod/quiz/tests/behat/editing_move_by_click.feature +++ b/mod/quiz/tests/behat/editing_move_by_click.feature @@ -33,7 +33,7 @@ Feature: Edit quiz page - drag-and-drop And I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" @javascript Scenario: Re-order questions by clicking on the move icon. diff --git a/mod/quiz/tests/behat/editing_remove_question.feature b/mod/quiz/tests/behat/editing_remove_question.feature index cc02d514184..c97e5105a1b 100644 --- a/mod/quiz/tests/behat/editing_remove_question.feature +++ b/mod/quiz/tests/behat/editing_remove_question.feature @@ -36,7 +36,7 @@ Feature: Edit quiz page - remove questions | Question A | 1 | | Question B | 1 | | Question C | 2 | - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" # Confirm the starting point. Then I should see "Question A" on quiz page "1" @@ -81,7 +81,7 @@ Feature: Edit quiz page - remove questions | heading | firstslot | shuffle | | Heading 1 | 1 | 1 | | Heading 2 | 2 | 1 | - When I follow "Edit quiz" + When I click on "Edit quiz" "link" in the "Administration" "block" Then "Delete" "link" in the "Question A" "list_item" should not be visible Then "Delete" "link" in the "Question B" "list_item" should be visible Then "Delete" "link" in the "Question C" "list_item" should be visible @@ -94,6 +94,6 @@ Feature: Edit quiz page - remove questions And quiz "Quiz 1" contains the following questions: | question | page | | Question A | 1 | - When I follow "Edit quiz" + When I click on "Edit quiz" "link" in the "Administration" "block" And I delete "Question A" in the quiz by clicking the delete icon Then I should see "Questions: 0" diff --git a/mod/quiz/tests/behat/editing_repaginate.feature b/mod/quiz/tests/behat/editing_repaginate.feature index c86865434ce..63dab9aa3c6 100644 --- a/mod/quiz/tests/behat/editing_repaginate.feature +++ b/mod/quiz/tests/behat/editing_repaginate.feature @@ -21,7 +21,7 @@ Feature: Edit quiz page - pagination When I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" @javascript Scenario: Repaginate questions with N question(s) per page as well as clicking diff --git a/mod/quiz/tests/behat/editing_require_previous.feature b/mod/quiz/tests/behat/editing_require_previous.feature index 6e1784225d7..61bff4ce121 100644 --- a/mod/quiz/tests/behat/editing_require_previous.feature +++ b/mod/quiz/tests/behat/editing_require_previous.feature @@ -32,7 +32,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" should not be visible # The text "be attempted" is used as a relatively unique string in both the add and remove links. @@ -51,7 +51,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @javascript @@ -69,7 +69,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @javascript @@ -89,7 +89,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" When I follow "No restriction on when question 2 can be attempted • Click to change" Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible @@ -111,7 +111,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" When I follow "Question 3 cannot be attempted until the previous question 2 has been completed • Click to change" Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible @@ -133,7 +133,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF1" "list_item" should not be visible Then "be attempted" "link" in the "TF2" "list_item" should not be visible @@ -155,7 +155,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | Section 1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -177,7 +177,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | Section 2 | 2 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -195,7 +195,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -213,7 +213,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF1" "list_item" should not be visible @javascript @@ -231,7 +231,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "be attempted" "link" in the "TF1" "list_item" should not be visible @javascript @@ -251,7 +251,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" When I move "Question 1" to "After Question 3" in the quiz by clicking the move icon Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible diff --git a/mod/quiz/tests/behat/editing_section_headings.feature b/mod/quiz/tests/behat/editing_section_headings.feature index 59380e761c5..67a2ffc2978 100644 --- a/mod/quiz/tests/behat/editing_section_headings.feature +++ b/mod/quiz/tests/behat/editing_section_headings.feature @@ -37,7 +37,7 @@ Feature: Edit quiz page - section headings | TF3 | 3 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then I should see "Shuffle" @javascript @@ -47,7 +47,7 @@ Feature: Edit quiz page - section headings | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I change quiz section heading "" to "This is section one" Then I should see "This is section one" @@ -76,7 +76,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I change quiz section heading "" to "This is section one" And I change quiz section heading "Heading 2" to "This is section two" Then I should see "This is section one" @@ -107,7 +107,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" When I change quiz section heading "Heading 1" to "" Then I should not see "Heading 1" And I should see "Heading 2" @@ -145,7 +145,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I follow "Remove heading 'Heading 2'" And I should see "Are you sure you want to remove the 'Heading 2' section heading?" And I click on "Yes" "button" in the "Confirm" "dialogue" @@ -173,7 +173,7 @@ Feature: Edit quiz page - section headings | Heading 2 | 2 | 0 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I change quiz section heading "Heading 2" to "Edited heading" Then I should see "Edited heading" And "Edit heading 'Edited heading'" "link" should be visible @@ -207,7 +207,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 5 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I move "TF5" to "After Question 2" in the quiz by clicking the move icon Then I should see "TF5" on quiz page "2" @@ -239,7 +239,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 5 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I move "TF1" to "After Question 3" in the quiz by clicking the move icon Then I should see "TF1" on quiz page "2" @@ -265,7 +265,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" Then "Remove heading 'Heading 1'" "link" should not exist And "Remove heading 'Heading 2'" "link" should exist And "Remove heading 'Heading 3'" "link" should exist @@ -292,7 +292,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 0 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I click on shuffle for section "Heading 1" on the quiz edit page And I click on shuffle for section "Heading 2" on the quiz edit page Then shuffle for section "Heading 1" should be "On" on the quiz edit page @@ -320,7 +320,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I click on shuffle for section "Heading 1" on the quiz edit page And I click on shuffle for section "Heading 2" on the quiz edit page Then shuffle for section "Heading 1" should be "Off" on the quiz edit page @@ -346,7 +346,7 @@ Feature: Edit quiz page - section headings | TF3 | 2 | When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I click on the "Add" page break icon after question "TF1" And I click on "Add" "link" in the "Page 1" "list_item" Then "a new section heading" "link" in the "Page 1" "list_item" should not be visible @@ -381,7 +381,7 @@ Feature: Edit quiz page - section headings When I follow "Course 1" And I follow "Quiz 1" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" And I click on the "Remove" page break icon after question "TF1" And I open the "Page 2" add to quiz menu And I choose "a new section heading" in the open action menu diff --git a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature index b678bba9775..453e6374d62 100644 --- a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature @@ -66,7 +66,7 @@ Feature: In order to create a quiz that awards marks the way I want | Decimal places in grades | 3 | | Decimal places in question grades | 5 | And I press "Save and display" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" # Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places. Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist And I should see "2.00000" diff --git a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature index 59210fd5a81..4dc007e56a1 100644 --- a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature @@ -78,7 +78,7 @@ Feature: In order to create a quiz that awards marks the way I want | Decimal places in grades | 3 | | Decimal places in question grades | 5 | And I press "Save and display" - And I follow "Edit quiz" + And I click on "Edit quiz" "link" in the "Administration" "block" # Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places. Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist And I should see "2.00000" diff --git a/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php b/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php index a1075c26a2c..7427dc60800 100644 --- a/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php +++ b/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php @@ -90,7 +90,13 @@ class behat_workshopallocation_manual extends behat_base { public function i_allocate_submissions_in_workshop_as($workshopname, TableNode $table) { $this->find_link($workshopname)->click(); - $this->find_link(get_string('allocate', 'workshop'))->click(); + $this->execute('behat_general::i_click_on_in_the', + array( + get_string('allocate', 'workshop'), + 'link', + 'Administration', + 'block' + )); $rows = $table->getRows(); $reviewer = $participant = null; for ($i = 0; $i < count($rows[0]); $i++) { diff --git a/mod/workshop/tests/behat/behat_mod_workshop.php b/mod/workshop/tests/behat/behat_mod_workshop.php index 1c9224a9a92..e36c604890c 100644 --- a/mod/workshop/tests/behat/behat_mod_workshop.php +++ b/mod/workshop/tests/behat/behat_mod_workshop.php @@ -96,7 +96,13 @@ class behat_mod_workshop extends behat_base { $this->execute('behat_general::click_link', $workshopname); - $this->execute('behat_general::click_link', $editassessmentform); + $this->execute('behat_general::i_click_on_in_the', + array( + $editassessmentform, + 'link', + 'Administration', + 'block' + )); $this->execute("behat_forms::i_set_the_following_fields_to_these_values", $table);