From 0b8fc262ba0815c97c2db4f666be152fd25403b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Castell=C3=B3n?= Date: Thu, 20 Feb 2020 10:19:44 +0100 Subject: [PATCH] MOBILE-3352 behat: Behat basic test for assignment --- .../tests/behat/app_basic_usage.feature | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/mod/assignment/tests/behat/app_basic_usage.feature b/mod/assignment/tests/behat/app_basic_usage.feature index ca6a5f23a..8bc5c0a1d 100755 --- a/mod/assignment/tests/behat/app_basic_usage.feature +++ b/mod/assignment/tests/behat/app_basic_usage.feature @@ -157,4 +157,39 @@ Feature: Test basic usage of assignment activity in app And I press the back button in the app And I press "assignment1" in the app Then I should not see "This Assignment has offline data to be synchronised." - And I should see "Submitted for grading" \ No newline at end of file + And I should see "Submitted for grading" + + @app @3.8.0 @OK + Scenario: Edit an offline submission before synchronizing it + 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 "Course 1" near "Recently accessed courses" in the app + Then the header should be "Course 1" 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 "Thursday, 1 January 1970, 1:00 AM" + And I press "Add submission" in the app + And I switch offline mode to "true" + And I set the field "Online text submissions" to "Submission test1" 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 test1" + And 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 not see "Submission test1" + And I should see "Submission test edited offline" + 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." + And 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 not see "This Assignment has offline data to be synchronised." + And I should see "Submitted for grading" + And I should see "Submission test edited offline" \ No newline at end of file