diff --git a/mod/messages/tests/behat/app_basic_usage.feature b/mod/messages/tests/behat/app_basic_usage.feature index 8c94bc1cb..9d373037d 100755 --- a/mod/messages/tests/behat/app_basic_usage.feature +++ b/mod/messages/tests/behat/app_basic_usage.feature @@ -157,7 +157,7 @@ Feature: Test basic usage of messages in app And I should see "hi" And I should see "byee" - @app @3.8.0 @OK + @app @3.8.0 @mobile @OK Scenario: User profile, send message, add/remove contact (mobile) When I enter the app And I log in as "teacher1" @@ -205,7 +205,7 @@ Feature: Test basic usage of messages in app And I should not see "heeey student" And I should not see "hi" - @app @3.8.0 @OK + @app @3.8.0 @tablet @OK Scenario: User profile, send message, add/remove contact (tablet) When I enter the app And I change viewport size to "1280x1080" @@ -249,4 +249,65 @@ Feature: Test basic usage of messages in app And I press "Delete conversation" in the app And I press "Delete" in the app And I should not see "heeey student" - And I should not see "hi" \ No newline at end of file + And I should not see "hi" + + @app @3.8.0 @mobile @OK + Scenario: Send message offline (mobile) + When I enter the app + And I log in as "teacher1" + Then the header should be "Acceptance test site" in the app + And I should see "Course 1" + And I press "Messages" in the app + And I press "Contacts" in the app + Then I should see "No contacts" + And I press "addon.messages.search" in the app + And I set the field "Search" to "student1" in the app + And I press "search" in the app + 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 + And I switch offline mode to "false" + And I press the back button in the app + And I press "Student1 student1" in the app + When I enter the app + And I log in as "student1" + Then the header should be "Acceptance test site" in the app + And I should see "Course 1" + And I press "Messages" in the app + And I press "Teacher teacher" in the app + Then I should see "heeey student" + And I should see "byee" + + @app @3.8.0 @tablet @OK + Scenario: Send message offline (tablet) + When I enter the app + And I change viewport size to "1280x1080" + And I log in as "teacher1" + Then the header should be "Acceptance test site" in the app + And I should see "Course 1" + And I press "Messages" in the app + And I press "Contacts" in the app + Then I should see "No contacts" + And I press "addon.messages.search" in the app + And I set the field "Search" to "student1" in the app + And I press "search" in the app + 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 + And I switch offline mode to "false" + And I press "Student1 student1" in the app + When I enter the app + And I change viewport size to "1280x1080" + And I log in as "student1" + Then the header should be "Acceptance test site" in the app + And I should see "Course 1" + And I press "Messages" in the app + And I press "Teacher teacher" in the app + Then I should see "heeey student" + And I should see "byee" \ No newline at end of file