mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-18229 gradebook: Fixes for Singleview behat tests.
This commit is contained in:
parent
f548d49f01
commit
f86233a41e
@ -26,6 +26,8 @@ namespace gradereport_singleview\local\ui;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
use grade_grade;
|
||||
|
||||
/**
|
||||
* Class that represents the exclude checkbox on a grade_grade.
|
||||
*
|
||||
|
@ -10,11 +10,11 @@ Feature: We can use Single view
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber | alternatename |
|
||||
| teacher1 | Teacher | 1 | teacher1@asd.com | t1 | teacherbro |
|
||||
| student1 | Student | 1 | student1@asd.com | s1 | studentbro |
|
||||
| student2 | Student | 2 | student1@asd.com | s2 | studentjo |
|
||||
| student3 | Student | 3 | student1@asd.com | s3 | studentlo |
|
||||
| student4 | Student | 4 | student1@asd.com | s4 | studentawesemo |
|
||||
| teacher1 | Teacher | 1 | teacher1@asd.com | t1 | fred |
|
||||
| student1 | Student | 1 | student1@asd.com | s1 | james |
|
||||
| student2 | Student | 2 | student1@asd.com | s2 | holly |
|
||||
| student3 | Student | 3 | student1@asd.com | s3 | anna |
|
||||
| student4 | Student | 4 | student1@asd.com | s4 | zac |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
@ -39,27 +39,27 @@ Feature: We can use Single view
|
||||
@javascript
|
||||
Scenario: I can update grades, add feedback and exclude grades.
|
||||
Given I click on "Single view" "option"
|
||||
And I click on "studentawesemo (Student) 4" "option"
|
||||
And I click on "Student 4" "option"
|
||||
And I click on "Override for Test assignment one" "checkbox"
|
||||
When I set the following fields to these values:
|
||||
| Grade for Test assignment one | 10.00 |
|
||||
| Feedback for Test assignment one | test data |
|
||||
And I click on "Exclude for Test assignment four" "checkbox"
|
||||
And I press "Update"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
Then the following should exist in the "generaltable" table:
|
||||
| Test assignment four |
|
||||
| excluded |
|
||||
And the following should exist in the "user-grades" table:
|
||||
And the following should exist in the "generaltable" table:
|
||||
| Test assignment one |
|
||||
| 10.00 |
|
||||
And I click on "Single view for Test assignment three" "link"
|
||||
And I click on "Override for studentbro (Student) 1" "checkbox"
|
||||
And I click on "Show grades for Test assignment three" "link"
|
||||
And I click on "Override for james (Student) 1" "checkbox"
|
||||
And I set the following fields to these values:
|
||||
| Grade for studentbro (Student) 1 | 12.05 |
|
||||
| Feedback for studentbro (Student) 1 | test data2 |
|
||||
And I click on "Exclude for studentjo (Student) 2" "checkbox"
|
||||
| Grade for james (Student) 1 | 12.05 |
|
||||
| Feedback for james (Student) 1 | test data2 |
|
||||
And I click on "Exclude for holly (Student) 2" "checkbox"
|
||||
And I press "Update"
|
||||
And the following should exist in the "user-grades" table:
|
||||
And the following should exist in the "generaltable" table:
|
||||
| Test assignment three |
|
||||
| 12.05 |
|
||||
| Excluded |
|
||||
@ -74,11 +74,11 @@ Feature: We can use Single view
|
||||
@javascript
|
||||
Scenario: Navigation works in the Single view.
|
||||
Given I click on "Single view" "option"
|
||||
Then I click on "studentbro (Student) 1" "option"
|
||||
Then I click on "Student 1" "option"
|
||||
Then I should see "Student 1"
|
||||
And I follow "studentjo (Student) 2"
|
||||
And I follow "Student 2"
|
||||
Then I should see "Student 2"
|
||||
And I follow "studentbro (Student) 1"
|
||||
And I follow "Student 1"
|
||||
Then I should see "Student 1"
|
||||
And I click on "Show grades for Test assignment four" "link"
|
||||
Then I should see "Test assignment four"
|
||||
|
Loading…
x
Reference in New Issue
Block a user