2021-06-07 15:40:33 +00:00
|
|
|
@mod @mod_forum @app @javascript
|
2020-01-09 11:03:12 +00:00
|
|
|
Feature: Test basic usage of forum activity in app
|
2019-06-07 12:14:18 +00:00
|
|
|
In order to participate in the forum while using the mobile app
|
|
|
|
As a student
|
|
|
|
I need basic forum functionality to work
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the following "courses" exist:
|
|
|
|
| fullname | shortname |
|
|
|
|
| Course 1 | C1 |
|
|
|
|
And the following "users" exist:
|
|
|
|
| username |
|
|
|
|
| student1 |
|
2019-12-20 17:27:54 +00:00
|
|
|
| student2 |
|
2019-12-11 10:51:52 +00:00
|
|
|
| teacher1 |
|
|
|
|
| teacher2 |
|
2019-06-07 12:14:18 +00:00
|
|
|
And the following "course enrolments" exist:
|
|
|
|
| user | course | role |
|
|
|
|
| student1 | C1 | student |
|
2019-12-20 17:27:54 +00:00
|
|
|
| student2 | C1 | student |
|
2019-12-11 10:51:52 +00:00
|
|
|
| teacher1 | C1 | editingteacher |
|
|
|
|
| teacher2 | C1 | editingteacher |
|
2019-06-07 12:14:18 +00:00
|
|
|
And the following "activities" exist:
|
2020-02-06 11:13:04 +00:00
|
|
|
| activity | name | intro | course | idnumber | groupmode | assessed | scale |
|
|
|
|
| forum | Test forum name | Test forum | C1 | forum | 0 | 1 | 1 |
|
2019-06-07 12:14:18 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: Create new discussion
|
2019-06-07 12:14:18 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "My happy subject" in the app
|
|
|
|
And I set the field "Message" to "An awesome message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "My happy subject" in the app
|
2019-06-07 12:14:18 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press "My happy subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "An awesome message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: Reply a post
|
2019-05-27 16:37:19 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "DiscussionSubject" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage" in the app
|
|
|
|
And I press "Post to forum" in the app
|
|
|
|
And I press "DiscussionSubject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "ReplyMessage" in the app
|
2019-05-27 16:37:19 +00:00
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionMessage" in the app
|
|
|
|
And I should find "ReplyMessage" in the app
|
2019-05-27 16:37:19 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: Star and pin discussions (student)
|
2019-12-11 10:51:52 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Subject" to "starred subject" in the app
|
|
|
|
And I set the field "Message" to "starred message" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Post to forum" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Subject" to "normal subject" in the app
|
|
|
|
And I set the field "Message" to "normal message" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Post to forum" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "starred subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "starred message" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press the back button in the app
|
|
|
|
And I press "Display options" near "starred subject" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
And I press "Star this discussion" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "starred subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "starred message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
|
|
|
And I press "normal subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "normal message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
|
|
|
And I press "Display options" near "starred subject" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
And I press "Unstar this discussion" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "starred subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "starred message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
|
|
|
And I press "normal subject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "normal message" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: Star and pin discussions (teacher)
|
2019-12-11 10:51:52 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I set the field "Subject" to "Auto-test star" in the app
|
|
|
|
And I set the field "Message" to "Auto-test star message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I set the field "Subject" to "Auto-test pin" in the app
|
|
|
|
And I set the field "Message" to "Auto-test pin message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "Auto-test plain" in the app
|
|
|
|
And I set the field "Message" to "Auto-test plain message" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Post to forum" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
And I press "Display options" near "Auto-test star" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Star this discussion" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
And I press "Display options" near "Auto-test pin" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Pin this discussion" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Auto-test pin" in the app
|
|
|
|
And I should find "Auto-test star" in the app
|
|
|
|
And I should find "Auto-test plain" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Display options" near "Auto-test pin" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Unpin this discussion" in the app
|
2020-02-11 09:04:36 +00:00
|
|
|
And I press "Display options" near "Auto-test star" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Unstar this discussion" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Auto-test star" in the app
|
|
|
|
And I should find "Auto-test pin" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
Scenario: Edit a not sent reply offline
|
2020-02-10 09:48:44 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
And I set the field "Subject" to "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
|
|
|
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
And I switch offline mode to "true"
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "not sent reply" in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
And I press "Post to forum" in the app
|
|
|
|
And I press "Display options" near "not sent reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Edit" in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press "Edit" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "not sent reply edited" in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Not sent" in the app
|
|
|
|
And I should find "This Discussion has offline data to be synchronised" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-02-10 09:48:44 +00:00
|
|
|
And I press the back button in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "Not sent" in the app
|
|
|
|
And I should not find "This Discussion has offline data to be synchronised" in the app
|
2020-02-10 09:48:44 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
Scenario: Edit a not sent new discussion offline
|
2020-02-10 10:22:12 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I switch offline mode to "true"
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-02-10 10:22:12 +00:00
|
|
|
And I set the field "Subject" to "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
|
|
|
And I press "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message edited" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "This Forum has offline data to be synchronised." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-02-10 10:22:12 +00:00
|
|
|
And I press "Auto-test" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Post to forum" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "This Forum has offline data to be synchronised." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I should find "Auto-test message edited" in the app
|
2020-02-10 10:22:12 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
Scenario: Edit a forum post (only online)
|
2019-12-11 10:51:52 +00:00
|
|
|
When I enter the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I log in as "student1"
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I set the field "Subject" to "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Auto-test" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2020-02-07 11:06:44 +00:00
|
|
|
And I press "Display options" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Show download options" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I press "Download" near "Test forum name" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Test forum name" in the app
|
2020-02-10 08:25:08 +00:00
|
|
|
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Display options" near "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Edit" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Edit" in the app
|
2020-09-23 16:06:18 +00:00
|
|
|
And I switch offline mode to "true"
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "Auto-test message edited" in the app
|
2020-02-10 10:22:12 +00:00
|
|
|
And I press "Save changes" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "There was a problem connecting to the site. Please check your connection and try again." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: Delete a forum post (only online)
|
2020-02-10 08:49:39 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-02-10 08:49:39 +00:00
|
|
|
And I set the field "Subject" to "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Auto-test" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2020-02-10 08:49:39 +00:00
|
|
|
And I press "Display options" in the app
|
|
|
|
And I press "Show download options" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I press "Download" near "Test forum name" in the app
|
2020-02-10 08:49:39 +00:00
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Auto-test" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Display options" near "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Delete" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Delete" in the app
|
2020-02-10 08:49:39 +00:00
|
|
|
And I press "Cancel" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I press "Display options" near "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "Delete" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-02-10 08:49:39 +00:00
|
|
|
And I press "Display options" near "Reply" in the app
|
|
|
|
And I press "Delete" in the app
|
|
|
|
And I press "Delete" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "Auto-test" in the app
|
2020-02-10 10:22:12 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
Scenario: Add/view ratings
|
|
|
|
Given I enter the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
And I set the field "Subject" to "Auto-test" in the app
|
|
|
|
And I set the field "Message" to "Auto-test message" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Auto-test" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "test2" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Post to forum" in the app
|
2019-12-11 10:51:52 +00:00
|
|
|
When I enter the app
|
2020-02-06 11:13:04 +00:00
|
|
|
And I log in as "teacher1"
|
2019-12-11 10:51:52 +00:00
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Auto-test" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "None" near "Auto-test message" in the app
|
2020-02-06 11:13:04 +00:00
|
|
|
And I press "1" near "Cancel" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I press "None" near "test2" in the app
|
|
|
|
And I press "0" near "Cancel" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Data stored in the device because it couldn't be sent. It will be sent automatically later." in the app
|
|
|
|
And I should find "Average of ratings: -" in the app
|
|
|
|
And I should find "Average of ratings: 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-02-06 11:13:04 +00:00
|
|
|
And I press the back button in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "This Forum has offline data to be synchronised." in the app
|
2020-02-06 11:13:04 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press "Display options" near "Test forum name" in the app
|
2020-02-06 11:13:04 +00:00
|
|
|
And I press "Synchronise now" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "This Forum has offline data to be synchronised." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Auto-test" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Average of ratings: 1" in the app
|
|
|
|
And I should find "Average of ratings: 0" in the app
|
|
|
|
But I should not find "Average of ratings: -" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-02-06 11:13:04 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Auto-test" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Average of ratings: 1" in the app
|
|
|
|
And I should find "Average of ratings: 0" in the app
|
|
|
|
But I should not find "Average of ratings: -" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: Reply a post offline
|
2019-12-20 17:27:54 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "DiscussionSubject" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2020-01-15 10:30:51 +00:00
|
|
|
And I press the back button in the app
|
2020-02-07 11:06:44 +00:00
|
|
|
And I press "Display options" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Show download options" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I press "Download" near "Test forum name" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "DiscussionSubject" in the app
|
|
|
|
And I switch offline mode to "true"
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "Reply" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
|
|
|
|
When I press "Reply" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I set the field "Message" to "ReplyMessage" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionMessage" in the app
|
|
|
|
And I should find "ReplyMessage" in the app
|
|
|
|
And I should find "Not sent" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press the back button in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I switch offline mode to "false"
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "DiscussionSubject" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionMessage" in the app
|
|
|
|
And I should find "ReplyMessage" in the app
|
|
|
|
But I should not find "Not sent" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: New discussion offline & Sync Forum
|
2019-12-20 17:27:54 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "DiscussionSubject" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject" in the app
|
|
|
|
And I should find "Not sent" in the app
|
|
|
|
And I should find "This Forum has offline data to be synchronised." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-01-15 10:30:51 +00:00
|
|
|
And I press the back button in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Test forum name" in the app
|
2020-02-07 11:06:44 +00:00
|
|
|
And I press "Display options" near "Test forum name" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Refresh discussions" in the app
|
|
|
|
And I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject" in the app
|
|
|
|
And I should find "DiscussionMessage" in the app
|
|
|
|
But I should not find "Not sent" in the app
|
|
|
|
And I should not find "This Forum has offline data to be synchronised." in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: New discussion offline & Auto-sync forum
|
2019-12-20 17:27:54 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "DiscussionSubject" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject" in the app
|
|
|
|
And I should find "Not sent" in the app
|
|
|
|
And I should find "This Forum has offline data to be synchronised." in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
|
|
|
And I run cron tasks in the app
|
|
|
|
And I wait loading to finish in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should not find "Not sent" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "DiscussionSubject" near "Sort by last post creation date in descending order" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject" in the app
|
|
|
|
And I should find "DiscussionMessage" in the app
|
|
|
|
But I should not find "Not sent" in the app
|
|
|
|
And I should not find "This Forum has offline data to be synchronised." in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
Scenario: Prefetch
|
2019-12-20 17:27:54 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Course 1" near "Course overview" in the app
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "Add a new discussion topic" in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I set the field "Subject" to "DiscussionSubject 1" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage 1" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2020-02-07 11:06:44 +00:00
|
|
|
And I press "Display options" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Show download options" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
And I press "Download" near "Test forum name" in the app
|
|
|
|
Then I should find "Downloaded" near "Test forum name" in the app
|
|
|
|
|
|
|
|
When I press "Test forum name" in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I press "Add a new discussion topic" in the app
|
|
|
|
And I set the field "Subject" to "DiscussionSubject 2" in the app
|
|
|
|
And I set the field "Message" to "DiscussionMessage 2" in the app
|
|
|
|
And I press "Post to forum" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject 1" in the app
|
|
|
|
And I should find "DiscussionSubject 2" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I press "Test forum name" in the app
|
|
|
|
And I press "DiscussionSubject 2" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "There was a problem connecting to the site. Please check your connection and try again." in the app
|
2019-12-20 17:27:54 +00:00
|
|
|
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press "OK" in the app
|
2020-01-15 10:30:51 +00:00
|
|
|
And I press the back button in the app
|
2020-07-01 09:34:40 +00:00
|
|
|
And I press "DiscussionSubject 1" in the app
|
2021-06-07 15:40:33 +00:00
|
|
|
Then I should find "DiscussionSubject 1" in the app
|
|
|
|
And I should find "DiscussionMessage 1" in the app
|
|
|
|
But I should not find "There was a problem connecting to the site. Please check your connection and try again." in the app
|