mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-46548 grades: Add behat test for xml export
This commit is contained in:
parent
26b0c96f5b
commit
8023a71b9a
1 changed files with 38 additions and 0 deletions
38
grade/export/xml/tests/behat/export.feature
Normal file
38
grade/export/xml/tests/behat/export.feature
Normal file
|
@ -0,0 +1,38 @@
|
|||
@gradeexport @gradeexport_xml
|
||||
Feature: I need to export grades as xml
|
||||
In order to easily review marks
|
||||
As a teacher
|
||||
I need to have a export grades as xml
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category | groupmode |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email | idnumber |
|
||||
| teacher1 | Teacher | 1 | teacher1@asd.com | t1 |
|
||||
| student1 | Student | 1 | student1@asd.com | s1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro |
|
||||
| assign | C1 | a1 | Test assignment name | Submit something! |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Grades"
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||
And I press "Update"
|
||||
|
||||
@_file_upload @javascript
|
||||
Scenario: Export grades as text
|
||||
When I navigate to "XML file" node in "Grade administration > Export"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Grade export decimal points" to "1"
|
||||
And I press "Download"
|
||||
Then I should see "s1"
|
||||
And I should see "a1"
|
||||
And I should see "80.0"
|
||||
And I should not see "80.00"
|
Loading…
Add table
Add a link
Reference in a new issue