2021-06-03 09:21:50 +00:00
|
|
|
@mod @mod_messages @app @javascript
|
2020-01-24 11:00:17 +00:00
|
|
|
Feature: Test basic usage of messages in app
|
|
|
|
In order to participate with messages while using the mobile app
|
|
|
|
As a student
|
2020-01-28 08:44:15 +00:00
|
|
|
I need basic message functionality to work
|
2020-01-24 11:00:17 +00:00
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the following "users" exist:
|
|
|
|
| username | firstname | lastname | email |
|
|
|
|
| teacher1 | Teacher | teacher | teacher1@example.com |
|
|
|
|
| student1 | Student1 | student1 | student1@example.com |
|
|
|
|
| student2 | Student2 | student2 | student2@example.com |
|
|
|
|
And the following "courses" exist:
|
|
|
|
| fullname | shortname | category |
|
|
|
|
| Course 1 | C1 | 0 |
|
|
|
|
And the following "course enrolments" exist:
|
|
|
|
| user | course | role |
|
|
|
|
| teacher1 | C1 | editingteacher |
|
|
|
|
| student1 | C1 | student |
|
|
|
|
| student2 | C1 | student |
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: View recent conversations and contacts
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "No contacts" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "heeey student" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Add to contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Add" near "Are you sure you want to add Student1 student1 to your contacts?" in the app
|
|
|
|
Then I should find "Contact request sent" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
|
|
|
And I press "Requests" in the app
|
|
|
|
And I press "Teacher teacher" in the app
|
|
|
|
And I press "Accept and add to contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should not find "Teacher teacher would like to contact you" in the app
|
|
|
|
|
|
|
|
When I press the back button in the app
|
|
|
|
And I press "Contacts" near "No contact requests" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
Then the header should be "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I should find "Teacher teacher" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
|
|
|
And I press "Teacher teacher" in the app
|
|
|
|
Then the header should be "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I should find "heeey student" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-01-24 11:17:36 +00:00
|
|
|
Scenario: Search users
|
2020-06-04 11:19:15 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student2" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
|
|
|
Then I should find "Student2 student2" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I set the field "Search" to "Teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
|
|
|
Then I should find "Teacher teacher" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-01-27 08:15:14 +00:00
|
|
|
Scenario: Send/receive messages in existing conversations
|
2020-06-04 11:19:15 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "heeey student" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I set the field "New message" to "hi" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "hi" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "hi" in the app
|
|
|
|
|
|
|
|
When I set the field "New message" to "byee" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "hi" in the app
|
|
|
|
And I should find "byee" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-06-15 15:11:16 +00:00
|
|
|
Scenario: User profile: send message, add/remove contact
|
2020-06-04 11:19:15 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "heeey student" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
|
|
|
|
When I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Add to contacts" in the app
|
|
|
|
And I press "Add" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Contact request sent" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
|
|
|
And I press "Requests" in the app
|
|
|
|
And I press "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Teacher teacher would like to contact you" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Accept and add to contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should not find "Teacher teacher would like to contact you" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
|
|
|
And I press "User info" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Message" in the app
|
|
|
|
And I set the field "New message" to "hi" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Send" "button" in the app
|
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "hi" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Remove from contacts" in the app
|
|
|
|
And I press "Remove" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I wait loading to finish in the app
|
|
|
|
And I press the back button in the app
|
|
|
|
And I press the back button in the app
|
|
|
|
And I press "Display options" in the app
|
|
|
|
Then I should find "Add to contacts" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
|
|
|
And I press "Delete conversation" in the app
|
|
|
|
And I press "Delete" near "Are you sure you would like to delete this entire conversation?" in the app
|
|
|
|
Then I should not find "heeey student" in the app
|
|
|
|
And I should not find "hi" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: Send message offline
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I set the field "New message" to "heeey student" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
|
|
|
|
When I set the field "New message" to "byee" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "byee" in the app
|
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press the back button in the app
|
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "byee" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "byee" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-01-29 10:02:31 +00:00
|
|
|
Scenario: Auto-sync messages
|
2020-06-04 11:19:15 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Contacts" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I switch offline mode to "true"
|
|
|
|
And I set the field "New message" to "heeey student" in the app
|
|
|
|
And I press "Send" in the app
|
|
|
|
And I set the field "New message" to "byee" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "byee" in the app
|
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-06-04 11:19:15 +00:00
|
|
|
And I run cron tasks in the app
|
|
|
|
And I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
|
|
|
And I press "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "heeey student" in the app
|
|
|
|
And I should find "byee" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2020-01-28 08:44:15 +00:00
|
|
|
Scenario: Search for messages
|
2020-06-04 11:19:15 +00:00
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "test message" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message" in the app
|
|
|
|
|
|
|
|
When I set the field "New message" to "search this message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "search this message" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "search this message" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
|
|
|
Then I should find "Messages" in the app
|
|
|
|
And I should find "search this message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "search this message" near "Teacher teacher" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message" in the app
|
|
|
|
And I should find "search this message" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: Star/Unstar
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "teacher1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "star message" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "star message" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "student2"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "test message student2" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message student2" in the app
|
|
|
|
|
|
|
|
When I enter the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Private (2)" in the app
|
|
|
|
And I should find "Starred (1)" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "star message" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Star conversation" in the app
|
|
|
|
And I press the back button in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Private (1)" in the app
|
|
|
|
And I should find "Starred (2)" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Starred (2)" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Teacher teacher" in the app
|
|
|
|
And I should find "Student1 student1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: User blocking feature
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student2"
|
2021-11-29 09:37:04 +00:00
|
|
|
And I enter the course "Course 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Participants" in the app
|
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Message" in the app
|
|
|
|
And I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Block user" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Block user" near "Are you sure you want to block Student1 student1?" in the app
|
|
|
|
Then I should find "You have blocked this user" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
2021-11-29 09:37:04 +00:00
|
|
|
And I enter the course "Course 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Participants" in the app
|
|
|
|
And I press "Student2 student2" in the app
|
|
|
|
And I press "Message" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "You are unable to message this user" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student2"
|
2021-11-29 09:37:04 +00:00
|
|
|
And I enter the course "Course 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Participants" in the app
|
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Message" in the app
|
|
|
|
And I press "Display options" in the app
|
|
|
|
Then I should find "Unblock user" in the app
|
|
|
|
But I should not find "Block user" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Unblock user" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Unblock user" near "Are you sure you want to unblock Student1 student1?" in the app
|
|
|
|
Then I should not find "You have blocked this user" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
2021-11-29 09:37:04 +00:00
|
|
|
And I enter the course "Course 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Participants" in the app
|
|
|
|
And I press "Student2 student2" in the app
|
|
|
|
And I press "Message" in the app
|
|
|
|
And I set the field "New message" to "test message" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message" in the app
|
|
|
|
But I should not find "You are unable to message this user" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: Mute Unmute conversations
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
2021-11-29 09:37:04 +00:00
|
|
|
And I enter the course "Course 1" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Participants" in the app
|
|
|
|
And I press "Student2 student2" in the app
|
|
|
|
And I press "Message" in the app
|
|
|
|
And I set the field "New message" to "test message" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message" in the app
|
|
|
|
|
|
|
|
When I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Mute" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Muted conversation" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
|
|
|
And I press "Unmute" in the app
|
|
|
|
Then I should not find "Muted conversation" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
When I press "Mute" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Muted conversation" in the app
|
|
|
|
|
|
|
|
When I press "Messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Private (1)" in the app
|
|
|
|
And I press "Student2 student2" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "test message" in the app
|
|
|
|
And I should find "Muted conversation" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
Scenario: Self conversations
|
|
|
|
When I enter the app
|
|
|
|
And I log in as "student1"
|
|
|
|
And I press "Messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "Starred (1)" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "self conversation online" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "self conversation online" in the app
|
|
|
|
|
|
|
|
When I switch offline mode to "true"
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "New message" to "self conversation offline" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "self conversation offline" in the app
|
|
|
|
|
|
|
|
When I switch offline mode to "false"
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press the back button in the app
|
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Display options" in the app
|
|
|
|
Then I should find "Show delete messages" in the app
|
|
|
|
And I should find "Delete conversation" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Unstar conversation" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Display options" in the app
|
|
|
|
Then I should find "Star conversation" in the app
|
|
|
|
And I should find "Delete conversation" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Show delete messages" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "self conversation online" in the app
|
|
|
|
And I should find "self conversation offline" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press "Delete message" near "self conversation offline" in the app
|
|
|
|
And I press "OK" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "self conversation online" in the app
|
|
|
|
But I should not find "self conversation offline" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
2021-06-03 09:21:50 +00:00
|
|
|
When I press "Display options" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Delete conversation" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Delete" near "Are you sure you would like to delete this entire personal conversation?" in the app
|
|
|
|
Then I should not find "self conversation online" in the app
|
|
|
|
And I should not find "self conversation offline" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
|
|
|
|
When I press the back button in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search people and messages" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I set the field "Search" to "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
And I press "Search" "button" in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press "Student1 student1" in the app
|
|
|
|
And I set the field "New message" to "auto search test" in the app
|
|
|
|
And I press "Send" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "auto search test" in the app
|
|
|
|
|
|
|
|
When I press the back button in the app
|
2020-06-04 11:19:15 +00:00
|
|
|
And I press the back button in the app
|
|
|
|
And I press "Private" in the app
|
|
|
|
And I press "Student1 student1" in the app
|
2021-06-03 09:21:50 +00:00
|
|
|
Then I should find "auto search test" in the app
|