forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-82353 gradingform: Behat to verify marking guide can be set to draft
- Loading branch information
1 parent
fd487cd
commit 9525db3
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
grade/grading/form/guide/tests/behat/edit_marking_guide_state.feature
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@gradingform @gradingform_guide | ||
Feature: Teacher can edit a marking guide state | ||
In order to change marking guide back to draft | ||
As a teacher | ||
I need to be able to edit the marking guide status | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | C1 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
And the following "activities" exist: | ||
| activity | course | name | advancedgradingmethod_submissions | | ||
| assign | C1 | Assign 1 | guide | | ||
|
||
Scenario: Marking guide state can be changed to draft | ||
Given I am on the "Course 1" course page logged in as teacher1 | ||
And I go to "Assign 1" advanced grading definition page | ||
And I set the following fields to these values: | ||
| Name | Assign 1 marking guide | | ||
| Description | Marking guide description | | ||
And I define the following marking guide: | ||
| Criterion name | Description for students | Description for markers | Maximum score | | ||
| Grade Criteria 1 | Grade 1 description for students | Grade 1 description for markers | 70 | | ||
| Grade Criteria 2 | Grade 2 description for students | Grade 2 description for markers | 30 | | ||
And I press "Save marking guide and make it ready" | ||
And I should not see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status." | ||
And I should not see "Assign 1 marking guide Draft" | ||
And I should see "Assign 1 marking guide Ready for use" | ||
And I click on "Edit the current form definition" "link" | ||
When I press "Save as draft" | ||
Then I should see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status." | ||
And I should see "Assign 1 marking guide Draft" | ||
And I should not see "Assign 1 marking guide Ready for use" |