Skip to content

Commit

Permalink
MDL-27072 behat: Fixed table separators
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Oct 12, 2016
1 parent 2660c96 commit c76e57a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
24 changes: 12 additions & 12 deletions mod/quiz/report/grading/tests/behat/grading.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Basic use of the Manual grading report
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | T1 | Teacher1 | teacher1@example.com | T1000 |
| student1 | S1 | Student1 | student1@example.com | S1000 !
| student1 | S1 | Student1 | student1@example.com | S1000 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
Expand Down Expand Up @@ -42,36 +42,36 @@ Feature: Basic use of the Manual grading report
And I log out

# Create an attempt.
When I log in as "student1"
And I log in as "student1"
And I follow "Course 1"
And I follow "Quiz 1"
And I press "Attempt quiz now"
Then I should see "Question 1"
And I should see "Question 1"
And I should see "Not yet answered"
And I should see "Where is the capital city of France?"
When I set the field "Answer:" to "Paris"
And I set the field "Answer:" to "Paris"
And I press "Finish attempt ..."
Then I should see "Answer saved"
When I press "Submit all and finish"
And I should see "Answer saved"
And I press "Submit all and finish"
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue"
And I log out

# Use the manual grading report.
When I log in as "teacher1"
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Quiz 1"
And I navigate to "Manual grading" node in "Quiz administration > Results"
Then I should see "Manual grading"
When I follow "Also show questions that have been graded automatically"
Then I should see "Short answer 001"
And I should see "Manual grading"
And I follow "Also show questions that have been graded automatically"
And I should see "Short answer 001"
And I should see "0" in the ".cell.c2" "css_element"
And I should see "0" in the ".cell.c3" "css_element"

# Adjust the mark for Student1.
When I click on "update grades" "link" in the "Short answer 001" "table_row"
And I click on "update grades" "link" in the "Short answer 001" "table_row"
And I set the field "Comment" to "I have adjusted your mark to 0.6"
And I set the field "Mark" to "0.6"
And I press "Save and go to next page"
Then I should see "All selected attempts have been graded. Returning to the list of questions."
And I should see "All selected attempts have been graded. Returning to the list of questions."
And I should see "0" in the ".cell.c2" "css_element"
And I should see "1" in the ".cell.c3" "css_element"
38 changes: 19 additions & 19 deletions mod/quiz/report/overview/tests/behat/basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Feature: Basic use of the Grades report
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | T1 | Teacher1 | teacher1@example.com | T1000 |
| student1 | S1 | Student1 | student1@example.com | S1000 !
| student2 | S2 | Student2 | student2@example.com | S2000 !
| student3 | S3 | Student3 | student3@example.com | S3000 !
| student1 | S1 | Student1 | student1@example.com | S1000 |
| student2 | S2 | Student2 | student2@example.com | S2000 |
| student3 | S3 | Student3 | student3@example.com | S3000 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
Expand Down Expand Up @@ -66,40 +66,40 @@ Feature: Basic use of the Grades report
And I navigate to "Grades" node in "Quiz administration > Results"
Then I should see "Attempts: 2"
# Check student1's grade
And I should see "25.00" in the "#mod-quiz-report-overview-report_r0_c8" "css_element"
And I should see "25.00" in the "S1 Student1" "table_row"
# And student2's grade
And I should see "100.00" in the "#mod-quiz-report-overview-report_r1_c8" "css_element"
And I should see "100.00" in the "S2 Student2" "table_row"

# Check changing the form parameters
When I set the field "Attempts from" to "enrolled users who have not attempted the quiz"
And I set the field "Attempts from" to "enrolled users who have not attempted the quiz"
And I press "Show report"
# Check teacher1's grade
Then I should see "-" in the "#mod-quiz-report-overview-report_r0_c8" "css_element"
And I should see "-" in the "T1 Teacher1" "table_row"
# Check student3's grade
And I should see "-" in the "#mod-quiz-report-overview-report_r1_c8" "css_element"
And I should see "-" in the "S3 Student3" "table_row"

When I set the field "Attempts from" to "enrolled users who have, or have not, attempted the quiz"
And I set the field "Attempts from" to "enrolled users who have, or have not, attempted the quiz"
And I press "Show report"
# Check student1's grade
Then I should see "25.00" in the "#mod-quiz-report-overview-report_r0_c8" "css_element"
And I should see "25.00" in the "S1 Student1" "table_row"
# Check student2's grade
And I should see "100.00" in the "#mod-quiz-report-overview-report_r1_c8" "css_element"
And I should see "100.00" in the "S2 Student2" "table_row"
# Check teacher1's grade
And I should see "-" in the "#mod-quiz-report-overview-report_r2_c8" "css_element"
And I should see "-" in the "T1 Teacher1" "table_row"

When I set the field "Attempts from" to "all users who have attempted the quiz"
And I set the field "Attempts from" to "all users who have attempted the quiz"
And I press "Show report"
# Check student1's grade
Then I should see "25.00" in the "#mod-quiz-report-overview-report_r0_c8" "css_element"
And I should see "25.00" in the "S1 Student1" "table_row"
# Check student2's grade
And I should see "100.00" in the "#mod-quiz-report-overview-report_r1_c8" "css_element"
And I should see "100.00" in the "S2 Student2" "table_row"

# Check regrade and delete attempts.
And I set the field with xpath "//tr[contains(normalize-space(.), 'student1@example.com')]//input[@type='checkbox']" to "1"
When I press "Regrade selected attempts"
And I press "Regrade selected attempts"
And I press "Continue"
Then I should see "student1@example.com"
And I should see "student1@example.com"
And I set the field with xpath "//tr[contains(normalize-space(.), 'student1@example.com')]//input[@type='checkbox']" to "1"
When I press "Delete selected attempts"
And I press "Delete selected attempts"
And I press "Yes"
Then I should not see "student1@example.com"
And I should not see "student1@example.com"

0 comments on commit c76e57a

Please sign in to comment.