MDL-49637 mod_assign: Fixing behat test

The participant number is dynamically generated so it is not possible to
match known values.

Match on the submission text instead.
This commit is contained in:
David Monllao 2015-04-30 11:04:09 +08:00
parent c80270fe89
commit 388b0beec1

View File

@ -45,27 +45,27 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I follow "Course 1"
And I follow "Test assignment name"
And I follow "View/grade all submissions"
And I should see "Not marked" in the "Participant 1" "table_row"
And I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
And I should see "Not marked" in the "I'm the student's first submission" "table_row"
And I click on "Grade Participant " "link" in the "I'm the student's first submission" "table_row"
And I set the field "Grade out of 100" to "50"
And I set the field "Marking workflow state" to "In review"
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I press "Save changes"
And I press "Continue"
And I should see "In review" in the "Participant 1" "table_row"
And I should see "In review" in the "I'm the student's first submission" "table_row"
@javascript
Scenario: Student identities are revealed after releasing the grades.
When I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
When I click on "Grade Participant " "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Ready for release"
And I press "Save changes"
And I press "Continue"
And I should see "Ready for release" in the "Participant 1" "table_row"
And I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
And I should see "Ready for release" in the "I'm the student's first submission" "table_row"
And I click on "Grade Participant " "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I press "Continue"
And I should see "Released" in the "Participant 1" "table_row"
And I should see "Released" in the "I'm the student's first submission" "table_row"
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
And I log out
@ -78,11 +78,11 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
@javascript
Scenario: Student identities are revealed before releasing the grades.
When I click on "Grade Participant 1" "link" in the "Participant 1" "table_row"
When I click on "Grade Participant " "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Ready for release"
And I press "Save changes"
And I press "Continue"
And I should see "Ready for release" in the "Participant 1" "table_row"
And I should see "Ready for release" in the "I'm the student's first submission" "table_row"
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
And I click on "Grade Student 1" "link" in the "Student 1" "table_row"