mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-78082 gradereport_grader: Acceptance test for locking
This commit is contained in:
parent
8e73a9ec19
commit
56abfc2d22
63
grade/report/grader/tests/behat/locking.feature
Normal file
63
grade/report/grader/tests/behat/locking.feature
Normal file
@ -0,0 +1,63 @@
|
||||
Feature: Locking Grade Items and Categories in Gradebook
|
||||
In order to ensure that grade items and categories can be securely locked in the gradebook,
|
||||
As a teacher,
|
||||
I need to perform locking actions and verify the locking status.
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname |
|
||||
| teacher1 | Teacher | 1 |
|
||||
| student1 | Student | 1 |
|
||||
| student2 | Student | 2 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "grade categories" exist:
|
||||
| fullname | course |
|
||||
| Category 1 | C1 |
|
||||
And the following "grade items" exist:
|
||||
| itemname | course | gradecategory |
|
||||
| Manual grade 1 | C1 | Category 1 |
|
||||
| Manual grade 2 | C1 | Category 1 |
|
||||
And the following "grade items" exist:
|
||||
| itemname | course |
|
||||
| Manual grade 3 | C1 |
|
||||
|
||||
@javascript
|
||||
Scenario: Locking and unlocking a grade item preserves individual student locks
|
||||
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
When I click on "Cell actions" "button" in the "//td[count(//th[.//descendant::a[normalize-space(text())='Manual grade 1']]/preceding-sibling::*)][../th[1]/a[normalize-space(text())='Student 1']]" "xpath_element"
|
||||
And I choose "Lock" in the open action menu
|
||||
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
||||
And I choose "Lock" in the open action menu
|
||||
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
||||
And I choose "Unlock" in the open action menu
|
||||
Then "Locked" "icon" should exist in the "Student 1" "table_row"
|
||||
And "Locked" "icon" should not exist in the "Student 2" "table_row"
|
||||
|
||||
@javascript
|
||||
Scenario: Locking and unlocking a grade item through editing form preserves individual student locks
|
||||
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
When I click on "Cell actions" "button" in the "//td[count(//th[.//descendant::a[normalize-space(text())='Manual grade 1']]/preceding-sibling::*)][../th[1]/a[normalize-space(text())='Student 1']]" "xpath_element"
|
||||
And I choose "Edit grade" in the open action menu
|
||||
And I set the field "Locked" to "1"
|
||||
And I press "Save changes"
|
||||
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
||||
And I choose "Edit grade item" in the open action menu
|
||||
And I set the field "Locked" to "1"
|
||||
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
||||
And I click on grade item menu "Manual grade 1" of type "gradeitem" on "grader" page
|
||||
And I choose "Edit grade item" in the open action menu
|
||||
And I set the field "Locked" to "0"
|
||||
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
||||
Then "Locked" "icon" should exist in the "Student 1" "table_row"
|
||||
And "Locked" "icon" should not exist in the "Student 2" "table_row"
|
Loading…
x
Reference in New Issue
Block a user