-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3752 from NoelDeMartin/MOBILE-4272
MOBILE-4272: Workshop tests
- Loading branch information
Showing
11 changed files
with
137 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
src/addons/mod/workshop/tests/behat/basic_usage.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
@mod @mod_workshop @app @javascript | ||
Feature: Test basic usage of workshop activity in app | ||
|
||
Background: | ||
Given the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | C1 | | ||
And the following "users" exist: | ||
| username | firstname | lastname | | ||
| student1 | First | Student | | ||
| student2 | Second | Student | | ||
| teacher1 | First | Teacher | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| student1 | C1 | student | | ||
| student2 | C1 | student | | ||
| teacher1 | C1 | editingteacher | | ||
And the following "activities" exist: | ||
| activity | name | intro | course | idnumber | | ||
| workshop | Test workshop | Workshop description | C1 | workshop | | ||
|
||
Scenario: Take a workshop | ||
|
||
# Setup phase | ||
Given I entered the workshop activity "workshop" on course "Course 1" as "teacher1" in the app | ||
Then I should find "Setup phase" in the app | ||
And I should find "Task done" within "Provide instructions for submission" "ion-item" in the app | ||
And I should find "Task done" within "Set the workshop description" "ion-item" in the app | ||
And I should find "Task to do" within "Edit assessment form" "ion-item" in the app | ||
And I should find "Task to do" within "Switch to the next phase" "ion-item" in the app | ||
|
||
When I press "Edit assessment form" in the app | ||
And I press "OK" in the app | ||
And I switch to the browser tab opened by the app | ||
And I log in as "teacher1" | ||
And I set the field "id_description__idx_0_editor" to "Was the submission good?" | ||
And I press "Save and close" | ||
And I change phase in workshop "Test workshop" to "Submission phase" | ||
And I close the browser tab opened by the app | ||
And I pull to refresh in the app | ||
Then I should find "Submission phase" in the app | ||
And I should find "Task done" within "Provide instructions for assessment" "ion-item" in the app | ||
And I should find "Task to do" within "Allocate submissions" "ion-item" in the app | ||
And I should find "expected: 2" within "Allocate submissions" "ion-item" in the app | ||
And I should find "submitted: 0" within "Allocate submissions" "ion-item" in the app | ||
And I should find "to allocate: 0" within "Allocate submissions" "ion-item" in the app | ||
|
||
# Submission phase | ||
Given I entered the workshop activity "workshop" on course "Course 1" as "student1" in the app | ||
Then I should find "Task to do" within "Submit your work" "ion-item" in the app | ||
|
||
When I press "Edit submission" in the app | ||
And I set the field "Title" to "The Answer" in the app | ||
And I set the field "Submission content" to "42" in the app | ||
And I press "Save" in the app | ||
Then I should find "Task done" within "Submit your work" "ion-item" in the app | ||
And I should find "The Answer" in the app | ||
And I should find "42" in the app | ||
|
||
Given I entered the workshop activity "workshop" on course "Course 1" as "teacher1" in the app | ||
When I pull to refresh in the app | ||
Then I should find "Submission phase" in the app | ||
And I should find "Task done" within "Provide instructions for assessment" "ion-item" in the app | ||
And I should find "Task to do" within "Allocate submissions" "ion-item" in the app | ||
And I should find "expected: 2" within "Allocate submissions" "ion-item" in the app | ||
And I should find "submitted: 1" within "Allocate submissions" "ion-item" in the app | ||
And I should find "to allocate: 1" within "Allocate submissions" "ion-item" in the app | ||
|
||
When I press "Allocate submissions" in the app | ||
And I press "OK" in the app | ||
And I switch to the browser tab opened by the app | ||
And I allocate submissions in workshop "Test workshop" as: | ||
| Participant | Reviewer | | ||
| First Student | Second Student | | ||
And I change phase in workshop "Test workshop" to "Assessment phase" | ||
And I close the browser tab opened by the app | ||
And I pull to refresh in the app | ||
Then I should find "Assessment phase" in the app | ||
|
||
# Assessment phase | ||
Given I entered the workshop activity "workshop" on course "Course 1" as "student2" in the app | ||
Then I should find "Task to do" within "Assess peers" "ion-item" in the app | ||
|
||
When I press "The Answer" in the app | ||
And I press "Grade for Aspect 01" in the app | ||
And I press "10 / 10" in the app | ||
And I press "Save" in the app | ||
Then I should find "Assessed submission" in the app | ||
|
||
# Grading evaluation phase | ||
Given I entered the workshop activity "workshop" on course "Course 1" as "teacher1" in the app | ||
And I press "Switch to the next phase" in the app | ||
And I press "OK" in the app | ||
And I switch to the browser tab opened by the app | ||
And I press "Continue" | ||
Then I should see "Grading evaluation phase" | ||
|
||
When I press "Re-calculate grades" | ||
Then I should see "calculated: 1" | ||
|
||
When I close the browser tab opened by the app | ||
And I pull to refresh in the app | ||
Then I should find "Grading evaluation phase" in the app | ||
|
||
# Closed | ||
When I press "Switch to the next phase" in the app | ||
And I press "OK" in the app | ||
And I switch to the browser tab opened by the app | ||
And I press "Continue" | ||
Then I should see "Closed" | ||
|
||
When I close the browser tab opened by the app | ||
And I pull to refresh in the app | ||
Then I should find "Closed" in the app | ||
And I should find "Conclusion 1" in the app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters