diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 2a5987b4d6ca8..f2aa63317d08f 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -1,4 +1,4 @@ -@tool @tool_behat +@tool @tool_behat @javascript Feature: Set up contextual data for tests In order to write tests quickly As a developer @@ -14,7 +14,6 @@ Feature: Set up contextual data for tests When I log in as "testuser2" Then I should see "TestFirstname" - @javascript Scenario: Add a bunch of courses and categories Given the following "categories" exist: | name | category | idnumber | @@ -43,7 +42,6 @@ Feature: Set up contextual data for tests And I follow "Category 1" And I should see "Course 3" - @javascript Scenario: Add a bunch of groups and groupings Given the following "courses" exist: | fullname | shortname | @@ -64,7 +62,6 @@ Feature: Set up contextual data for tests And I should see "Grouping 1" And I should see "Grouping 2" - @javascript Scenario: Role overrides Given the following "users" exist: | username | firstname | lastname | email | @@ -224,7 +221,6 @@ Feature: Set up contextual data for tests And I follow "Settings" And the field "Type" matches value "Scale" - @javascript Scenario: Add relations between users and groups Given the following "users" exist: | username | firstname | lastname | email | @@ -291,7 +287,7 @@ Feature: Set up contextual data for tests And I should not see "Cohort in category" And I am on course index And I follow "Cat 1" - And I follow "Cohorts" + And I navigate to "Cohorts" in current page administration And I should not see "System cohort" And the following should exist in the "cohorts" table: | Name | Cohort size | @@ -335,19 +331,22 @@ Feature: Set up contextual data for tests And I am on "Course 1" course homepage And I navigate to "Setup > Gradebook setup" in the course gradebook Then I should see "Test Grade Item 1" - And I follow "Edit Test Grade Item 1" + And I open the action menu in "Test Grade Item 1" "table_row" + And I choose "Edit" in the open action menu And I expand all fieldsets And I should see "Course 1" And I press "Cancel" And I should see "Grade category 1" And I should see "Test Grade Item 2" - And I follow "Edit Test Grade Item 2" + And I open the action menu in "Test Grade Item 2" "table_row" + And I choose "Edit" in the open action menu And I expand all fieldsets And I should see "Grade category 1" And I press "Cancel" And I should see "Grade sub category 2" And I should see "Test Grade Item 3" - And I follow "Edit Test Grade Item 3" + And I open the action menu in "Test Grade Item 3" "table_row" + And I choose "Edit" in the open action menu And I expand all fieldsets And I should see "Grade sub category 2" And I press "Cancel" @@ -412,7 +411,8 @@ Feature: Set up contextual data for tests And I am on "Course 1" course homepage And I navigate to "Setup > Gradebook setup" in the course gradebook Then I should see "Test Outcome Grade Item 1" - And I follow "Edit Test Outcome Grade Item 1" + And I open the action menu in "Test Outcome Grade Item 1" "table_row" + And I choose "Edit" in the open action menu And the field "Outcome" matches value "Grade outcome 1" And I expand all fieldsets And I should see "Grade category 1" in the "Grade category" "form_row" diff --git a/blocks/activity_results/tests/behat/addblockinactivity.feature b/blocks/activity_results/tests/behat/addblockinactivity.feature index e4379d7958173..b418a8c73568f 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student scores In order to be display student scores As a user @@ -45,7 +45,7 @@ Feature: The activity results block displays student scores And I am on "Course 1" course homepage Scenario: Configure the block on a non-graded activity to show 3 high scores - Given I follow "Test page name" + Given I am on the "Test page name" "page activity" page And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: @@ -63,25 +63,25 @@ Feature: The activity results block displays student scores And I should see "70.00" in the "Activity results" "block" Scenario: Block should select current activity by default - Given I follow "Test assignment 1" + Given I am on the "Test assignment 1" "assign activity" page When I add the "Activity results" block And I configure the "Activity results" block Then the field "config_activitygradeitemid" matches value "Test assignment 1" And I press "Cancel" And I am on "Course 1" course homepage - And I follow "Test assignment 2" + And I am on the "Test assignment 2" "assign activity" page And I add the "Activity results" block And I configure the "Activity results" block And the field "config_activitygradeitemid" matches value "Test assignment 2" And I press "Cancel" And I am on "Course 1" course homepage - And I follow "Test assignment 3" + And I am on the "Test assignment 3" "assign activity" page And I add the "Activity results" block And I configure the "Activity results" block And the field "config_activitygradeitemid" matches value "Test assignment 3" And I press "Cancel" And I am on "Course 1" course homepage - And I follow "Test page name" + And I am on the "Test page name" "page activity" page And I add the "Activity results" block And I configure the "Activity results" block And the field "config_activitygradeitemid" does not match value "Test page name" diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index d7bec1de82323..aba0c34c46e13 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student high scores In order to be display student scores As a user diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index 64fe9570b643e..0af28c4aee5e2 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays students high scores in group as scales In order to be display student scores as scales As a user diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index d0130318e0efb..d3b3b68634183 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student in group high scores as scales In order to be display student scores as scales As a user @@ -53,7 +53,7 @@ Feature: The activity results block displays student in group high scores as sca | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test assignment" + And I am on the "Test assignment" "assign activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | assignsubmission_file_enabled | 0 | diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index fd523674b8419..daa5d10a11d0d 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student in separate groups scores In order to be display student scores As a user diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index 479d8b01d920a..6b3103b0af3d3 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student in visible groups scores In order to be display student scores As a user @@ -46,7 +46,7 @@ Feature: The activity results block displays student in visible groups scores | assign | Test assignment | Test assignment | C1 | assign1 | 1 | 0 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I follow "Test assignment" + And I am on the "Test assignment" "assign activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | Group mode | Visible groups | diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index 753cc1eb1dcf2..4ed74d718d67e 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student low scores In order to be display student scores As a user diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 6b94c52d1e831..54b5654b23203 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student low scores as scales In order to be display student scores as scales As a user @@ -41,7 +41,7 @@ Feature: The activity results block displays student low scores as scales | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" And I am on "Course 1" course homepage with editing mode on - And I follow "Test assignment" + And I am on the "Test assignment" "assign activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | id_grade_modgrade_type | Scale | diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index d9265d318e7f2..f0f20b47f2cb9 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays students in groups low scores as scales In order to be display student scores as scales As a user diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index 7f4fcfa276d9c..2214a8704aaff 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays students in separate groups scores In order to be display student scores As a user diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index 7e6fb4d4705c7..253f1c5b3d96d 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -1,4 +1,4 @@ -@block @block_activity_results +@block @block_activity_results @javascript Feature: The activity results block displays student in visible groups low scores In order to be display student scores As a user diff --git a/completion/tests/behat/enable_completion_on_pass_grade.feature b/completion/tests/behat/enable_completion_on_pass_grade.feature index 062bacda203cd..10087f72ec140 100644 --- a/completion/tests/behat/enable_completion_on_pass_grade.feature +++ b/completion/tests/behat/enable_completion_on_pass_grade.feature @@ -1,4 +1,4 @@ -@core @core_completion +@core @core_completion @javascript Feature: Students will be marked as completed if they have achieved a passing grade. Background: diff --git a/completion/tests/behat/enable_completion_on_view_and_grade.feature b/completion/tests/behat/enable_completion_on_view_and_grade.feature index cf9d21a63d687..69fe918b26a44 100644 --- a/completion/tests/behat/enable_completion_on_view_and_grade.feature +++ b/completion/tests/behat/enable_completion_on_view_and_grade.feature @@ -1,4 +1,4 @@ -@core @core_completion +@core @core_completion @javascript Feature: Students will be marked as completed and pass/fail if they have viewed an activity and achieved a grade. diff --git a/grade/report/grader/tests/behat/ajax_grader.feature b/grade/report/grader/tests/behat/ajax_grader.feature index de8115dab7237..e90259cd5bbf6 100644 --- a/grade/report/grader/tests/behat/ajax_grader.feature +++ b/grade/report/grader/tests/behat/ajax_grader.feature @@ -58,6 +58,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "View > Grader report" in the course gradebook + And I change window size to "large" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should not see a feedback field for "Student 2" and grade item "Item VU" @@ -112,6 +113,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "View > Grader report" in the course gradebook + And I change window size to "large" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should see a feedback field for "Student 2" and grade item "Item VU" @@ -149,6 +151,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "View > Grader report" in the course gradebook + And I change window size to "large" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should see a feedback field for "Student 2" and grade item "Item VU" diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index a4388a58a4bfd..cc24da9a0ca48 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -1,4 +1,4 @@ -@core @core_grades @gradereport_singleview +@core @core_grades @gradereport_singleview @javascript Feature: We can use Single view As a teacher In order to view and edit grades @@ -57,7 +57,6 @@ Feature: We can use Single view And I am on "Course 1" course homepage Given I navigate to "View > Grader report" in the course gradebook - @javascript Scenario: I can update grades, add feedback and exclude grades. Given I navigate to "View > Single view" in the course gradebook And I select "Student" from the "Select user..." singleselect diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index f7a9080b35462..a6c174bad72ea 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -1,4 +1,4 @@ -@core @core_grades @gradereport_user +@core @core_grades @gradereport_user @javascript Feature: View the user report as the student will see it In order to know what grades students will see As a teacher diff --git a/grade/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 854b76ae50073..6a3495c1b9f24 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -8,6 +8,7 @@ Feature: We can use the user report | fullname | shortname | category | | Course 1 | C1 | 0 | + @javascript Scenario: Verify we can view a user grade report with no users enrolled. Given I log in as "admin" And I am on "Course 1" course homepage diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index f3e3bdb469bed..cec86fbc639c9 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can use calculated grade totals In order to calculate grade totals As an teacher @@ -427,9 +427,9 @@ Feature: We can use calculated grade totals And I should see "270.00 (27.27 %)" in the ".course" "css_element" And I turn editing mode on And I set the following settings for grade item "Manual item 2": - | Extra credit | 0 | - | Maximum grade | 200 | | Rescale existing grades | No | + | Maximum grade | 200 | + | Extra credit | 0 | And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" And I press "Save changes" And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" @@ -438,9 +438,9 @@ Feature: We can use calculated grade totals And I should see "270.00 (22.69 %)" in the ".course" "css_element" And I turn editing mode on And I set the following settings for grade item "Manual item 2": - | Extra credit | 0 | - | Maximum grade | 100 | | Rescale existing grades | No | + | Maximum grade | 100 | + | Extra credit | 0 | And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" And I press "Save changes" And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" @@ -456,7 +456,6 @@ Feature: We can use calculated grade totals And I navigate to "View > Grader report" in the course gradebook And I should see "270.00 (24.77 %)" in the ".course" "css_element" - @javascript Scenario: Natural aggregation from the setup screen And I navigate to "Setup > Gradebook setup" in the course gradebook @@ -509,7 +508,6 @@ Feature: We can use calculated grade totals And I reset weights for grade category "Sub category 2 &" And the field "Weight of Test assignment ten" matches value "33.333" - @javascript Scenario: Natural aggregation with weights of zero When I navigate to "View > Grader report" in the course gradebook And I set the following settings for grade item "Course 1": diff --git a/grade/tests/behat/grade_aggregation_changes.feature b/grade/tests/behat/grade_aggregation_changes.feature index df8cb3e70dede..1feab4147d5e7 100644 --- a/grade/tests/behat/grade_aggregation_changes.feature +++ b/grade/tests/behat/grade_aggregation_changes.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Changing the aggregation of an item affects its weight and extra credit definition In order to switch to another aggregation method As an teacher @@ -332,7 +332,6 @@ Feature: Changing the aggregation of an item affects its weight and extra credit And the field "Extra credit" matches value "0" And I press "Cancel" - @javascript Scenario: Switching grade items between categories # Move to same aggregation (Natural). Given I navigate to "Setup > Gradebook setup" in the course gradebook diff --git a/grade/tests/behat/grade_average.feature b/grade/tests/behat/grade_average.feature index 53f04f129cdb7..a66c94d972373 100644 --- a/grade/tests/behat/grade_average.feature +++ b/grade/tests/behat/grade_average.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Average grades are displayed in the gradebook In order to check the expected results are displayed As an admin diff --git a/grade/tests/behat/grade_category_validation.feature b/grade/tests/behat/grade_category_validation.feature index b11e533b862a0..e27b702f9c35a 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -1,4 +1,4 @@ -@core_grades +@core_grades @javascript Feature: Editing a grade item In order to ensure validation is provided to the teacher As a teacher @@ -53,16 +53,20 @@ Feature: Editing a grade item And I press "Save changes" Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades - When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + When I open the action menu in "EN Cat 1" "table_row" + And I choose "Edit settings" in the open action menu Then I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" + And I expand all fieldsets And I set the field "Grade type" to "Scale" And I press "Save changes" And I should see "Scale must be selected" And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" And I should not see "You cannot change the type, as grades already exist for this item" - And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + And I open the action menu in "EN Cat 1" "table_row" + And I choose "Edit settings" in the open action menu And I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" + And I expand all fieldsets And I set the field "Scale" to "EN Letter scale" And I press "Save changes" And I should not see "You cannot change the scale, as grades already exist for this item" @@ -73,12 +77,16 @@ Feature: Editing a grade item And I give the grade "20.00" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + And I open the action menu in "EN Cat 1" "table_row" + When I choose "Edit settings" in the open action menu + And I expand all fieldsets Then I should see "This category has associated grade items which have been overridden. Therefore 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." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist Scenario: Attempting to change a category item's scale when overridden grades already exist - Given I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + Given I open the action menu in "EN Cat 1" "table_row" + And I choose "Edit settings" in the open action menu + And I expand all fieldsets And I set the field "Grade type" to "Scale" And I set the field "Scale" to "ABCDEF" And I press "Save changes" @@ -87,7 +95,9 @@ Feature: Editing a grade item And I give the grade "C" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + And I open the action menu in "EN Cat 1" "table_row" + When I choose "Edit settings" in the open action menu + And I expand all fieldsets Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type and scale cannot be changed." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist @@ -97,10 +107,12 @@ Feature: Editing a grade item And I give the grade "20.00" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" - And I set the field "Maximum grade" to "50" - When I press "Save changes" - Then I should see "You must choose whether to rescale existing grades or not." + And I open the action menu in "EN Cat 1" "table_row" + When I choose "Edit settings" in the open action menu + And I expand all fieldsets + Then I should see "This category has associated grade items which have been overridden. Therefore 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." + And I should see "Choose" in the "Rescale overridden grades" "field" + And the "Maximum grade" "field" should be disabled Scenario: Perform changes to a grade category with custom decimal separator Given the following "language customisations" exist: @@ -111,7 +123,9 @@ Feature: Editing a grade item And I give the grade "20#00" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + And I open the action menu in "EN Cat 1" "table_row" + And I choose "Edit settings" in the open action menu + And I expand all fieldsets And I set the field "Rescale overridden grades" to "Yes" And I set the field "Maximum grade" to "87#50" When I press "Save changes" diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index 874cd9b43c8e3..2cc6119ca9056 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can change the maximum and minimum number of points for manual items with existing grades In order to verify existing grades are modified as expected As an teacher @@ -41,10 +41,11 @@ Feature: We can change the maximum and minimum number of points for manual items And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" And I press "Save changes" When I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit settings" "link" in the "Manual item 1" "table_row" + And I open the action menu in "Manual item 1" "table_row" + And I choose "Edit settings" in the open action menu And I set the following fields to these values: - | Maximum grade | 10 | | Rescale existing grades | No | + | Maximum grade | 10 | And I press "Save changes" And I navigate to "View > User report" in the course gradebook And I select "Student 1" from the "Select all or one user" singleselect @@ -56,10 +57,11 @@ Feature: We can change the maximum and minimum number of points for manual items | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 8.00 | 80.00 % | And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit settings" "link" in the "Manual item 1" "table_row" + And I open the action menu in "Manual item 1" "table_row" + And I choose "Edit settings" in the open action menu And I set the following fields to these values: - | Maximum grade | 20 | | Rescale existing grades | Yes | + | Maximum grade | 20 | And I press "Save changes" And I navigate to "View > User report" in the course gradebook And I select "Student 1" from the "Select all or one user" singleselect diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index 7bb31e8dd5a0c..911dd5e2a9a9a 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Student and teacher's view of aggregated grade items is consistent when hidden grade items are present In order to calculate grade totals As an teacher @@ -73,4 +73,4 @@ Feature: Student and teacher's view of aggregated grade items is consistent when | Test assignment two | -( Empty ) | - | 0–100 | - | - | | Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | | Course total | - | 100.00 | 0–200 | 50.00 % | - | - And I should not see "Test assignment four" + And I should not see "Test assignment four" in the "user-grade" "table" diff --git a/grade/tests/behat/grade_hidden_items_locked_category.feature b/grade/tests/behat/grade_hidden_items_locked_category.feature index 6cc1154ea2b76..aaec7a37472c3 100644 --- a/grade/tests/behat/grade_hidden_items_locked_category.feature +++ b/grade/tests/behat/grade_hidden_items_locked_category.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Hidden grade items should be hidden when grade category is locked, but should be visible in overridden category In order to verify existing grades items display as expected As an teacher diff --git a/grade/tests/behat/grade_item_duplication.feature b/grade/tests/behat/grade_item_duplication.feature index 8bbcdad51f0ad..0a132ee5a67ed 100644 --- a/grade/tests/behat/grade_item_duplication.feature +++ b/grade/tests/behat/grade_item_duplication.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can duplicate grade items that already exist. In order to quickly create grade items that have similar settings. As a teacher @@ -32,7 +32,8 @@ Feature: We can duplicate grade items that already exist. And I should not see "Duplicate Assignment1" When I duplicate the grade item "Item1" Then I should see "Item1 (copy)" - And I follow "Edit Item1 (copy)" + And I open the action menu in "Item1 (copy)" "table_row" + And I choose "Edit settings" in the open action menu And the field "Item name" matches value "Item1 (copy)" And the field "ID number" matches value "" And the field "Grade type" matches value "Value" diff --git a/grade/tests/behat/grade_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index cd9392e3492b6..6faff35f51409 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -1,4 +1,4 @@ -@core_grades +@core_grades @javascript Feature: Grade item validation In order to ensure validation is provided to the teacher As a teacher @@ -38,7 +38,8 @@ Feature: Grade item validation And I press "Save changes" Scenario: Being able to change the grade type, scale and maximum grade for a manual grade item when there are no grades - Given I click on "Edit settings" "link" in the "EN MI 1" "table_row" + Given I open the action menu in "EN MI 1" "table_row" + And I choose "Edit settings" in the open action menu When I should not see "Some grades have already been awarded, so the grade type" Then I set the field "Grade type" to "Scale" And I press "Save changes" @@ -46,7 +47,8 @@ Feature: Grade item validation And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" And I should not see "You cannot change the type, as grades already exist for this item" - And I click on "Edit settings" "link" in the "EN MI 1" "table_row" + And I open the action menu in "EN MI 1" "table_row" + And I choose "Edit settings" in the open action menu And I should not see "Some grades have already been awarded, so the grade type" And I set the field "Scale" to "EN Letter scale" And I press "Save changes" @@ -58,12 +60,14 @@ Feature: Grade item validation And I give the grade "20.00" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - When I click on "Edit settings" "link" in the "EN MI 1" "table_row" + And I open the action menu in "EN MI 1" "table_row" + When I choose "Edit settings" in the open action menu 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." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist Scenario: Attempting to change a manual item's scale when grades already exist - Given I click on "Edit settings" "link" in the "EN MI 1" "table_row" + Given I open the action menu in "EN MI 1" "table_row" + And I choose "Edit settings" in the open action menu And I set the field "Grade type" to "Scale" And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" @@ -72,7 +76,8 @@ Feature: Grade item validation And I give the grade "C" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - When I click on "Edit settings" "link" in the "EN MI 1" "table_row" + And I open the action menu in "EN MI 1" "table_row" + When I choose "Edit settings" in the open action menu Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist @@ -82,7 +87,8 @@ Feature: Grade item validation And I give the grade "20.00" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit settings" "link" in the "EN MI 1" "table_row" - And I set the field "Maximum grade" to "50" - When I press "Save changes" - Then I should see "You must choose whether to rescale existing grades or not." + And I open the action menu in "EN MI 1" "table_row" + When I choose "Edit settings" in the open action menu + 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." + And I should see "Choose" in the "Rescale existing grades" "field" + And the "Maximum grade" "field" should be disabled diff --git a/grade/tests/behat/grade_letter_logging.feature b/grade/tests/behat/grade_letter_logging.feature index e86d082bbe799..7d7426227cad9 100644 --- a/grade/tests/behat/grade_letter_logging.feature +++ b/grade/tests/behat/grade_letter_logging.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can view the logs for any changes to grade letters. In order to view changes the letter boundary of a course As an administrator diff --git a/grade/tests/behat/grade_minmax.feature b/grade/tests/behat/grade_minmax.feature index b1535e04b4c7f..60cc12aa54d0f 100644 --- a/grade/tests/behat/grade_minmax.feature +++ b/grade/tests/behat/grade_minmax.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can choose what min or max grade to use when aggregating grades. In order to what min or max grade to use As an teacher @@ -98,13 +98,13 @@ Feature: We can choose what min or max grade to use when aggregating grades. | Course total | - | 60.00 | 0–300 | 20.00 % | - | And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "MI 1": + | Rescale existing grades | No | | Maximum grade | 50.00 | | Minimum grade | 5.00 | - | Rescale existing grades | No | And I set the following settings for grade item "MI 3": + | Rescale existing grades | No | | Maximum grade | 50.00 | | Minimum grade | 5.00 | - | Rescale existing grades | No | And I navigate to "View > User report" in the course gradebook And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: @@ -128,8 +128,8 @@ Feature: We can choose what min or max grade to use when aggregating grades. | Course total | - | 60.00 | 0–200 | 30.00 % | - | And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "MI 5": - | Maximum grade | 200.00 | | Rescale existing grades | No | + | Maximum grade | 200.00 | And I navigate to "View > User report" in the course gradebook And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: diff --git a/grade/tests/behat/grade_override_letter.feature b/grade/tests/behat/grade_override_letter.feature index 54c35ac70117e..10dc85880d355 100644 --- a/grade/tests/behat/grade_override_letter.feature +++ b/grade/tests/behat/grade_override_letter.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Grade letters can be overridden In order to test the grade letters functionality As a teacher I override site defaults diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index a453d2a8ff159..7632b5c3797df 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Control the aggregation of the scales In order to use control the aggregation of the scales As an admin @@ -80,7 +80,6 @@ Feature: Control the aggregation of the scales | Highest grade | Highest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % | | Mode of grades | Mode of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % | - @javascript Scenario: Weights of scales cannot be edited when they are not aggregated Given I log in as "teacher1" And I am on "Course 1" course homepage diff --git a/grade/tests/behat/grade_to_pass.feature b/grade/tests/behat/grade_to_pass.feature index 46d8f65d0aa59..4c601a0c305ed 100644 --- a/grade/tests/behat/grade_to_pass.feature +++ b/grade/tests/behat/grade_to_pass.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can set the grade to pass value In order to set the grade to pass value As a teacher @@ -29,7 +29,6 @@ Feature: We can set the grade to pass value And I log in as "teacher1" And I am on "Course 1" course homepage - @javascript Scenario: Validate that switching the type of grading used correctly disables grade to pass Given I turn editing mode on And I am on the "Test Assignment 1" "assign activity" page @@ -41,7 +40,6 @@ Feature: We can set the grade to pass value And the "Grade to pass" "field" should be disabled And I press "Save and return to course" - @javascript Scenario: Create an activity with a Grade to pass value greater than the maximum grade When I turn editing mode on And I am on the "Test Assignment 1" "assign activity" page @@ -54,7 +52,6 @@ Feature: We can set the grade to pass value Then I should see "The grade to pass can not be greater than the maximum possible grade 50" And I press "Cancel" - @javascript Scenario: Set a valid grade to pass for an assignment activity using points When I turn editing mode on And I am on the "Test Assignment 1" "assign activity" page @@ -78,7 +75,6 @@ Feature: We can set the grade to pass value And I click on "Edit assign Test Assignment 1" "link" And the field "Grade to pass" matches value "30" - @javascript Scenario: Set a valid grade to pass for an assignment activity using scales When I turn editing mode on And I am on the "Test Assignment 1" "assign activity" page @@ -99,7 +95,6 @@ Feature: We can set the grade to pass value And I navigate to "Settings" in current page administration And the field "Grade to pass" matches value "4" - @javascript Scenario: Set a invalid grade to pass for an assignment activity using scales When I turn editing mode on And I am on the "Test Assignment 1" "assign activity" page @@ -116,7 +111,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Workshop 1" + And I am on the "Test Workshop 1" "workshop activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | grade | 80 | @@ -136,7 +131,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "15" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Workshop 1" + And I am on the "Test Workshop 1" "workshop activity" page And I follow "Settings" And the field "Submission grade to pass" matches value "45" And the field "Assessment grade to pass" matches value "15" @@ -146,7 +141,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Workshop 1" + And I am on the "Test Workshop 1" "workshop activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | grade | 80 | @@ -162,7 +157,7 @@ Feature: We can set the grade to pass value | activity | name | course | section | idnumber | | quiz | Test Quiz 1 | C1 | 1 | quiz1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Quiz 1" + And I am on the "Test Quiz 1" "quiz activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | Grade to pass | 9.5 | @@ -174,7 +169,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "8" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Quiz 1" + And I am on the "Test Quiz 1" "quiz activity" page And I follow "Settings" And the field "Grade to pass" matches value "8.00" @@ -183,7 +178,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Lesson 1" + And I am on the "Test Lesson 1" "lesson activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | Grade to pass | 90 | @@ -195,7 +190,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Lesson 1" + And I am on the "Test Lesson 1" "lesson activity" page And I follow "Settings" And the field "Grade to pass" matches value "80" @@ -207,7 +202,7 @@ Feature: We can set the grade to pass value | component | stringid | value | | core_langconfig | decsep | # | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Lesson 1" + And I am on the "Test Lesson 1" "lesson activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | Grade to pass | 90#50 | @@ -219,7 +214,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Lesson 1" + And I am on the "Test Lesson 1" "lesson activity" page And I follow "Settings" And the field "Grade to pass" matches value "80#00" @@ -228,7 +223,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | data | Test Database 1 | Test | C1 | 1 | data1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Database 1" + And I am on the "Test Database 1" "data activity" page And I navigate to "Settings" in current page administration And I expand all fieldsets And I set the following fields to these values: @@ -243,7 +238,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Database 1" + And I am on the "Test Database 1" "data activity" page And I follow "Settings" And the field "Grade to pass" matches value "80" @@ -252,7 +247,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | forum | Test Forum 1 | Test | C1 | 1 | forum1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Forum 1" + And I am on the "Test Forum 1" "forum activity" page And I navigate to "Settings" in current page administration And I expand all fieldsets And I set the following fields to these values: @@ -268,7 +263,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | forum | Test Forum 1 | Test | C1 | 1 | forum1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Forum 1" + And I am on the "Test Forum 1" "forum activity" page And I navigate to "Settings" in current page administration And I expand all fieldsets And I set the following fields to these values: @@ -283,7 +278,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Forum 1" + And I am on the "Test Forum 1" "forum activity" page And I follow "Settings" And the field "Ratings > Grade to pass" matches value "80" @@ -292,7 +287,7 @@ Feature: We can set the grade to pass value | activity | name | intro | course | section | idnumber | | glossary | Test Glossary 1 | Test | C1 | 1 | glossary1 | And I am on "Course 1" course homepage with editing mode on - And I follow "Test Glossary 1" + And I am on the "Test Glossary 1" "glossary activity" page And I navigate to "Settings" in current page administration And I set the following fields to these values: | Ratings > Aggregate type | Average of ratings | @@ -306,6 +301,6 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I am on "Course 1" course homepage - And I follow "Test Glossary 1" + And I am on the "Test Glossary 1" "glossary activity" page And I follow "Settings" And the field "Grade to pass" matches value "80" diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index 7c6299a1db3f0..6a1ac1a4f7794 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: We can enter in grades and view reports from the gradebook In order to check the expected results are displayed As a teacher @@ -70,7 +70,7 @@ Feature: We can enter in grades and view reports from the gradebook Scenario: Grade a grade item and ensure the results display correctly in the gradebook When I navigate to "View > User report" in the course gradebook - And the "jump" select box should contain "Grader report" + And the "Gradebook navigation menu" select menu should contain "Grader report" And the "Select all or one user" select box should contain "All users (1)" And I log out And I log in as "student1" diff --git a/mod/forum/tests/behat/grade_forum.feature b/mod/forum/tests/behat/grade_forum.feature index da1f30b1a834b..d05d6fadbc77b 100644 --- a/mod/forum/tests/behat/grade_forum.feature +++ b/mod/forum/tests/behat/grade_forum.feature @@ -1,4 +1,4 @@ -@mod @mod_forum @core_grades +@mod @mod_forum @core_grades @javascript Feature: I can grade a students interaction across a forum In order to assess a student's contributions As a teacher @@ -28,7 +28,6 @@ Feature: I can grade a students interaction across a forum And I am on "Course 1" course homepage And I turn editing mode on - @javascript Scenario: Ensure that forum grade settings do not leak to Ratings Given I add a "Forum" to section "1" And I expand all fieldsets @@ -73,7 +72,6 @@ Feature: I can grade a students interaction across a forum Then the field "Grade to pass" matches value "4" And I should see "Tutor" in the "Parent category" "fieldset" - @javascript Scenario: Ensure that Ratings settings do not leak to Forum grading Given I add a "Forum" to section "1" And I expand all fieldsets @@ -140,6 +138,7 @@ Feature: I can grade a students interaction across a forum And I am on "Course 1" course homepage And I follow "Test Forum 1" And I navigate to "Settings" in current page administration + And I expand all fieldsets And I set the field "Ratings > Aggregate type" to "Count of ratings" And I set the field "Ratings > Type" to "Point" And I set the field "Ratings > Maximum grade" to "100" diff --git a/user/tests/behat/user_grade_navigation.feature b/user/tests/behat/user_grade_navigation.feature index 040087ac2c295..a8c4778548fd3 100644 --- a/user/tests/behat/user_grade_navigation.feature +++ b/user/tests/behat/user_grade_navigation.feature @@ -1,4 +1,4 @@ -@core @core_user +@core @core_user @javascript Feature: The student can navigate to their grades page and user grade report. In order to view my grades and the user grade report As a user @@ -55,7 +55,6 @@ Feature: The student can navigate to their grades page and user grade report. | grade_mygrades_report | external | | gradereport_mygradeurl | /badges/mybadges.php | And I log in as "student1" - And I follow "Student 1" And I follow "Grades" in the user menu Then I should see "My badges from Acceptance test site web site"