From b72fa5fbae1e6147a9d93b9ce30b2b3a661c4bcc Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 26 Aug 2021 09:09:58 +0800 Subject: [PATCH] MDL-71912 behat: Updating various tests using assign steps. --- .../grade/tests/behat/availability_grade.feature | 2 +- .../tests/behat/activity_completion_criteria.feature | 6 +++--- completion/tests/behat/restrict_activity_by_grade.feature | 2 +- .../tests/behat/restrict_section_availability.feature | 2 +- lib/form/tests/behat/modgrade_validation.feature | 2 +- lib/tests/behat/alpha_chooser.feature | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/availability/condition/grade/tests/behat/availability_grade.feature b/availability/condition/grade/tests/behat/availability_grade.feature index 91414892a23..74e5915633c 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -110,7 +110,7 @@ Feature: availability_grade When I am on the "A1" "assign activity" page logged in as teacher1 # Give the assignment 40%. - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" # 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/activity_completion_criteria.feature b/completion/tests/behat/activity_completion_criteria.feature index fbab217b8d3..f08fde3641d 100644 --- a/completion/tests/behat/activity_completion_criteria.feature +++ b/completion/tests/behat/activity_completion_criteria.feature @@ -61,7 +61,7 @@ Feature: Allow to mark course as completed without cron for activity completion @javascript Scenario: Update course completion when teacher grades a single assignment Given I am on the "Test assignment name" "assign activity" page logged in as teacher1 - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" And I click on "Grade" "link" in the "student1@example.com" "table_row" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" @@ -90,7 +90,7 @@ Feature: Allow to mark course as completed without cron for activity completion And I set the field "Assignment - Test assignment name2" to "1" And I press "Save changes" And I am on the "Test assignment name" "assign activity" page - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" And I click on "Grade" "link" in the "student1@example.com" "table_row" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" @@ -101,7 +101,7 @@ Feature: Allow to mark course as completed without cron for activity completion And I should see "Status: In progress" And I log out And I am on the "Test assignment name2" "assign activity" page logged in as teacher1 - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" And I click on "Grade" "link" in the "student1@example.com" "table_row" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" diff --git a/completion/tests/behat/restrict_activity_by_grade.feature b/completion/tests/behat/restrict_activity_by_grade.feature index a8ae67bd632..8812610aebd 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -55,7 +55,7 @@ Feature: Restrict activity availability through grade conditions And I log out And I am on the "Grade assignment" "assign activity" page logged in as teacher1 - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" 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 40f9681a98f..47fe0443e71 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -88,7 +88,7 @@ Feature: Restrict sections availability through completion or grade conditions And I should see "Submitted for grading" And I log out And I am on the "Grade assignment" "assign activity" page logged in as teacher1 - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" 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/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index 619af76393a..6aa1ba3ab6e 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -106,7 +106,7 @@ Feature: Using the activity grade form element | grade[modgrade_scale] | ABCDEF | And I press "Save and display" And I am on the "Test assignment name" "assign activity" page - And I navigate to "View all submissions" in current page administration + And I follow "View all submissions" 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" diff --git a/lib/tests/behat/alpha_chooser.feature b/lib/tests/behat/alpha_chooser.feature index 77063b1018a..afd9d4556ca 100644 --- a/lib/tests/behat/alpha_chooser.feature +++ b/lib/tests/behat/alpha_chooser.feature @@ -69,7 +69,7 @@ Feature: Initials bar | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | | assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 | And I am on the "assign1" "Activity" page logged in as "teacher" - When I navigate to "View all submissions" in current page administration + When I follow "View all submissions" And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element" And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element" @@ -94,7 +94,7 @@ Feature: Initials bar And I should see "Bstudent Astudent" And I should not see "Cstudent Cstudent" And I am on the "assign1" "Activity" page - When I navigate to "View all submissions" in current page administration + When I follow "View all submissions" And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element" And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element" @@ -124,7 +124,7 @@ Feature: Initials bar | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | | assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 | And I am on the "assign1" "Activity" page logged in as "teacher" - When I navigate to "View all submissions" in current page administration + When I follow "View all submissions" And I select "View gradebook" from the "jump" singleselect And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element" @@ -150,7 +150,7 @@ Feature: Initials bar And I should see "Bstudent Astudent" And I should not see "Cstudent Cstudent" And I am on the "assign1" "Activity" page - When I navigate to "View all submissions" in current page administration + When I follow "View all submissions" And I select "View gradebook" from the "jump" singleselect And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"