forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! MDL-81714 grades: Display "Run now" button for admins in task …
…indicator
- Loading branch information
1 parent
468236e
commit 023c769
Showing
6 changed files
with
37 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,12 +58,10 @@ Feature: Asynchronous regrade on a large course | |
|
||
Scenario Outline: Task indicator displays on all grade reports when a calculation is pending | ||
Given I am on the "Test course 2" "<report>" page logged in as "<user>" | ||
Then I should not see "Grades are being recalculated due to recent changes." | ||
Then I should not see "The report will update automatically. You don't need to do anything." | ||
And <element> should exist | ||
When I am on the "Test course 1" "<report>" page logged in as "<user>" | ||
Then I should see "Grades are being recalculated due to recent changes." | ||
And I should see "Task pending" | ||
And I should see "0.0%" | ||
Then I should see "The report will update automatically. You don't need to do anything." | ||
And <element> should not exist | ||
|
||
Examples: | ||
|
@@ -78,10 +76,10 @@ Feature: Asynchronous regrade on a large course | |
Scenario Outline: Gradebook settings can be accessed when a regrade is pending | ||
Given I am on the "Test course 2" "<page>" page logged in as "teacher1" | ||
Then I should see "<text>" | ||
And I should not see "Grades are being recalculated due to recent changes." | ||
And I should not see "The report will update automatically. You don't need to do anything." | ||
Given I am on the "Test course 1" "<page>" page logged in as "teacher1" | ||
Then I should see "<text>" | ||
And I should not see "Grades are being recalculated due to recent changes." | ||
And I should not see "The report will update automatically. You don't need to do anything." | ||
|
||
Examples: | ||
| page | text | | ||
|
@@ -93,37 +91,32 @@ Feature: Asynchronous regrade on a large course | |
When I follow "Grades" in the user menu | ||
And I follow "Test course 2" | ||
Then "table.user-grade" "css_element" should exist | ||
Then I should not see "Grades are being recalculated due to recent changes." | ||
Then I should not see "The report will update automatically. You don't need to do anything." | ||
When I follow "Grades" in the user menu | ||
And I follow "Test course 1" | ||
Then "table.user-grade" "css_element" should not exist | ||
Then I should see "Grades are being recalculated due to recent changes." | ||
Then I should see "The report will update automatically. You don't need to do anything." | ||
|
||
Scenario: Task indicator progresses and redirects when the task is run. | ||
When I am on the "Test course 1" "grades > Grader report > View" page logged in as teacher1 | ||
And I should see "Grades are being recalculated due to recent changes." | ||
And I should see "Task pending" | ||
And I should see "The report will update automatically. You don't need to do anything." | ||
And I should not see "Run now" | ||
And I should see "0.0%" | ||
And I should not see "0.0%" | ||
And "user-grades" "table" should not exist | ||
When I run all adhoc tasks | ||
And I run all adhoc tasks | ||
# Progress bar should update. | ||
# Manual wait is a bit of a fudge, but we need the progress bar to poll for an update. | ||
And I wait "1" seconds | ||
Then I should not see "Task pending" | ||
And I should see "Recalculating grades" | ||
And I wait until "Recalculating grades" "text" exists | ||
And I should see "100%" | ||
When I wait "2" seconds | ||
# The page should reload after a short delay. | ||
Then I should not see "Grades are being recalculated due to recent changes." | ||
Then I wait until "Recalculating grades" "text" does not exist | ||
And I set the field "Search users" to "Student 1" | ||
And "user-grades" "table" should exist | ||
And "40.00" "text" should exist in the "[email protected]" "table_row" | ||
|
||
Scenario: Admin should see a "Run now" button in the task indicator | ||
When I am on the "Test course 1" "grades > Grader report > View" page logged in as admin | ||
And I should see "Grades are being recalculated due to recent changes." | ||
And I should see "Task pending" | ||
And I should see "The report will update automatically. You don't need to do anything." | ||
And I should not see "0.0%" | ||
And I should see "Run now" | ||
|
||
Scenario: Making changes on course with less than 100 grades performs the regrade synchronously, no indicator is shown. | ||
|
@@ -133,17 +126,17 @@ Feature: Asynchronous regrade on a large course | |
And I set the field "Maximum grade" to "50" | ||
And I press "Save and return to course" | ||
When I am on the "Test course 2" "grades > Grader report > View" page | ||
Then I should not see "Grades are being recalculated due to recent changes." | ||
Then I should not see "The report will update automatically. You don't need to do anything." | ||
And "user-grades" "table" should exist | ||
|
||
Scenario: Editing weights triggers a regrade, but further edits are possible | ||
Given I run all adhoc tasks | ||
And I am on the "Test course 1" "grades > Grader report > View" page logged in as "teacher1" | ||
And I should not see "Grades are being recalculated due to recent changes." | ||
And I should not see "The report will update automatically. You don't need to do anything." | ||
And I am on the "Test course 1" "grades > Gradebook setup" page | ||
When I set the field "Override weight of Test assignment 1" to "1" | ||
And I press "Save changes" | ||
And I am on the "Test course 1" "grades > Grader report > View" page | ||
And I should see "Grades are being recalculated due to recent changes." | ||
And I should see "The report will update automatically. You don't need to do anything." | ||
And I am on the "Test course 1" "grades > Gradebook setup" page | ||
And I should not see "Grades are being recalculated due to recent changes." | ||
And I should not see "The report will update automatically. You don't need to do anything." |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters