MOBILE-3320 behat: Update assignment tests

main
Noel De Martin 2021-06-08 18:36:17 +02:00
parent 3d3dc9c7b1
commit 9e3ba9dbdf
1 changed files with 36 additions and 40 deletions

View File

@ -1,4 +1,4 @@
@mod @mod_assign @app @app_upto3.9.4 @javascript
@mod @mod_assign @app @javascript
Feature: Test basic usage of assignment activity in app
In order to participate in the assignment while using the mobile app
I need basic assignment functionality to work
@ -19,7 +19,6 @@ Feature: Test basic usage of assignment activity in app
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | duedate | attemptreopenmethod |
| assign | C1 | assign1 | assignment1 | Test assignment description1 | 1 | 1029844800 | manual |
@app @3.8.0
Scenario: View assign description, due date & View list of student submissions (as teacher) & View own submission or student submission
# Create, edit and submit as a student
When I enter the app
@ -27,27 +26,27 @@ Feature: Test basic usage of assignment activity in app
And I press "Course 1" near "Recently accessed courses" in the app
And I press "assignment1" in the app
Then the header should be "assignment1" in the app
And I should see "Test assignment description1"
And I should see "Due date"
And I should see "Tuesday, 20 August 2002, 12:00 PM"
And I should find "Test assignment description1" in the app
And I should find "Due:" in the app
And I should find "20 August 2002, 12:00 PM" in the app
When I press "Add submission" in the app
And I set the field "Online text submissions" to "Submission test" in the app
And I press "Save" in the app
Then I should see "Draft (not submitted)"
And I should see "Not graded"
Then I should find "Draft (not submitted)" in the app
And I should find "Not graded" in the app
When I press "Edit submission" in the app
And I set the field "Online text submissions" to "Submission test edited" in the app
And I press "Save" in the app
And I press "OK" in the app
Then I should see "Submission test edited"
Then I should find "Submission test edited" in the app
When I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "Submitted for grading"
And I should see "Not graded"
And I should see "Submission test edited"
Then I should find "Submitted for grading" in the app
And I should find "Not graded" in the app
And I should find "Submission test edited" in the app
# View as a teacher
When I enter the app
@ -57,14 +56,13 @@ Feature: Test basic usage of assignment activity in app
Then the header should be "assignment1" in the app
When I press "Submitted" in the app
Then I should see "Student student"
And I should see "Not graded"
Then I should find "Student student" in the app
And I should find "Not graded" in the app
When I press "Student student" near "assignment1" in the app
Then I should see "Online text submissions"
And I should see "Submission test edited"
Then I should find "Online text submissions" in the app
And I should find "Submission test edited" in the app
@app @3.8.0
Scenario: Edit/Add submission (online text) & Add new attempt from previous submission & Submit for grading
# Submit first attempt as a student
Given I enter the app
@ -86,23 +84,23 @@ Feature: Test basic usage of assignment activity in app
And I press "Student student" near "assignment1" in the app
And I press "Grade" in the app
And I press "Allow another attempt" in the app
And I press "Done"
Then I should see "Reopened"
And I should see "Not graded"
And I press "Done" in the app
Then I should find "Reopened" in the app
And I should find "Not graded" in the app
# Submit second attempt as a student
When I enter the app
And I log in as "student1"
And I press "Course 1" near "Recently accessed courses" in the app
And I press "assignment1" in the app
Then I should see "Reopened"
And I should see "2 out of Unlimited"
And I should see "Add a new attempt based on previous submission"
And I should see "Add a new attempt"
Then I should find "Reopened" in the app
And I should find "2 out of Unlimited" in the app
And I should find "Add a new attempt based on previous submission" in the app
And I should find "Add a new attempt" in the app
When I press "Add a new attempt based on previous submission" in the app
And I press "OK" in the app
Then I should see "Submission test 1st attempt"
Then I should find "Submission test 1st attempt" in the app
When I set the field "Online text submissions" to "Submission test 2nd attempt" in the app
And I press "Save" in the app
@ -117,10 +115,9 @@ Feature: Test basic usage of assignment activity in app
And I press "assignment1" in the app
And I press "Participants" in the app
And I press "Student student" near "assignment1" in the app
Then I should see "Online text submissions"
And I should see "Submission test 2nd attempt"
Then I should find "Online text submissions" in the app
And I should find "Submission test 2nd attempt" in the app
@app @3.8.0
Scenario: Add submission offline (online text) & Submit for grading offline & Sync submissions
When I enter the app
And I log in as "student1"
@ -132,17 +129,16 @@ Feature: Test basic usage of assignment activity in app
And I press "Save" in the app
And I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "This Assignment has offline data to be synchronised."
Then I should find "This Assignment has offline data to be synchronised." in the app
When I switch offline mode to "false"
And I press the back button in the app
And I press "assignment1" in the app
And I press "Display options" in the app
And I press "Refresh" in the app
Then I should see "Submitted for grading"
But I should not see "This Assignment has offline data to be synchronised."
Then I should find "Submitted for grading" in the app
But I should not find "This Assignment has offline data to be synchronised." in the app
@app @3.8.0
Scenario: Edit an offline submission before synchronising it
When I enter the app
And I log in as "student1"
@ -152,23 +148,23 @@ Feature: Test basic usage of assignment activity in app
And I switch offline mode to "true"
And I set the field "Online text submissions" to "Submission test original offline" in the app
And I press "Save" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I should see "Submission test original offline"
Then I should find "This Assignment has offline data to be synchronised." in the app
And I should find "Submission test original offline" in the app
When I press "Edit submission" in the app
And I set the field "Online text submissions" to "Submission test edited offline" in the app
And I press "Save" in the app
Then I should see "This Assignment has offline data to be synchronised."
And I should see "Submission test edited offline"
But I should not see "Submission test original offline"
Then I should find "This Assignment has offline data to be synchronised." in the app
And I should find "Submission test edited offline" in the app
But I should not find "Submission test original offline" in the app
When I press "Submit assignment" in the app
And I press "OK" in the app
Then I should see "This Assignment has offline data to be synchronised."
Then I should find "This Assignment has offline data to be synchronised." in the app
When I switch offline mode to "false"
And I press the back button in the app
And I press "assignment1" in the app
Then I should see "Submitted for grading"
And I should see "Submission test edited offline"
But I should not see "This Assignment has offline data to be synchronised."
Then I should find "Submitted for grading" in the app
And I should find "Submission test edited offline" in the app
But I should not find "This Assignment has offline data to be synchronised." in the app