MDL-75423 gradereport_singleview: Update behat scenarios

This commit is contained in:
Shamim Rezaie
2022-11-10 22:43:13 +08:00
committed by Mihail Geshoski
parent 219b3db5f6
commit c39cbf876d
5 changed files with 15 additions and 10 deletions
@@ -133,9 +133,10 @@ Feature: Allow to mark course as completed without cron for activity completion
Scenario: Course completion should not be updated when teacher grades assignment on activity grader report page
Given I log in as "teacher1"
And I am on "Completion course" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I follow "Single view"
And I select "Student First" from the "Select user..." singleselect
And I navigate to "View > Single view" in the course gradebook
And I click on "User" "link" in the ".singleindex" "css_element"
And I turn editing mode on
And I click on "Student First" in the "user" search widget
And I set the field "Override for Test assignment name" to "1"
When I set the following fields to these values:
| Grade for Test assignment name | 10.00 |
@@ -22,7 +22,7 @@ Feature: Given we have opted to search for a grade item, Lets find and search th
Scenario: A teacher can search for and find a grade item to view
Given I navigate to "View > Single view" in the course gradebook
And I click on "Grade items" "link" in the ".singleindex" "css_element"
When I click on "Click to select a grade item" "link"
When I click on ".gradewidget" "css_element"
Then I confirm "Test assignment one" in "Select a grade item" search within the gradebook widget exists
And I confirm "Test assignment two" in "Select a grade item" search within the gradebook widget exists
And I set the field "searchinput" to "two"
@@ -21,9 +21,9 @@ Feature: Given we land on the index page, select what type of report we wish to
Scenario: I switch between the two report types within singleview
Given I navigate to "View > Single view" in the course gradebook
And I click on "Grade items" "link" in the ".singleindex" "css_element"
When I click on "Click to select a grade item" "link"
When I click on ".gradewidget" "css_element"
Then I wait until "Select a grade item" "dialogue" exists
And I click on "Close" "button" in the "Select a grade item" "dialogue"
And I click on "Users" "link" in the ".page-toggler" "css_element"
And I click on "Click to select a user" "link"
And I click on ".userwidget" "css_element"
And I wait until "Select a user" "dialogue" exists
@@ -61,6 +61,7 @@ Feature: We can use Single view
Given I navigate to "View > Single view" in the course gradebook
And I click on "User" "link" in the ".singleindex" "css_element"
And I click on "Student" in the "user" search widget
And I turn editing mode on
And I set the field "Override for Test assignment one" to "1"
When I set the following fields to these values:
| Grade for Test assignment one | 10.00 |
@@ -76,7 +77,8 @@ Feature: We can use Single view
Then I should see "Grades were set for 1 items"
And the field "Grade for Test grade item" matches value "45.00"
And the field "Grade for Course total" matches value "55.00"
And I click on "Show grades for Test assignment three" "link"
And I open the action menu in "Test assignment three" "table_row"
And I choose "Show all grades" in the open action menu
And I click on "Override for Ann, Jill, Grainne, Beauchamp" "checkbox"
And I set the following fields to these values:
| Grade for Ann, Jill, Grainne, Beauchamp | 12.05 |
@@ -86,7 +88,7 @@ Feature: We can use Single view
Then I should see "Grades were set for 2 items"
And the field "Grade for Ann, Jill, Grainne, Beauchamp" matches value "12.05"
And the field "Exclude for Jane, Nina, Niamh, Cholmondely" matches value "1"
And I select "new grade item 1" from the "Select grade item..." singleselect
And I click on "new grade item 1" in the "grade" search widget
And I set the field "Grade for Ann, Jill, Grainne, Beauchamp" to "Very good"
And I press "Save"
Then I should see "Grades were set for 1 items"
@@ -99,6 +101,7 @@ Feature: We can use Single view
Given I navigate to "View > Single view" in the course gradebook
And I click on "User" "link" in the ".singleindex" "css_element"
And I click on "Student" in the "user" search widget
And I turn editing mode on
And the "Exclude for Test assignment one" "checkbox" should be disabled
And the "Override for Test assignment one" "checkbox" should be enabled
@@ -143,7 +146,8 @@ Feature: We can use Single view
Then I should see "Nee,Chumlee"
And I follow "Gronya,Beecham"
Then I should see "Gronya,Beecham"
And I click on "Show grades for Test assignment four" "link"
And I open the action menu in "Test assignment four" "table_row"
And I choose "Show all grades" in the open action menu
Then I should see "Test assignment four"
And I follow "Test assignment three"
Then I should see "Test assignment three"
@@ -23,7 +23,7 @@ Feature: Within the singleview report, a teacher can search for users.
Given I navigate to "View > Single view" in the course gradebook
When I click on "User" "link" in the ".singleindex" "css_element"
And I wait until the page is ready
And I click on "Click to select a user" "link"
And I click on ".userwidget" "css_element"
Then I confirm "Student 1" in "Select a user" search within the gradebook widget exists
And I confirm "Student 2" in "Select a user" search within the gradebook widget exists
And I confirm "Student 32" in "Select a user" search within the gradebook widget exists