From a9e0677dbd8c0290e3ab5d9da5ee9073bd290df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Castell=C3=B3n?= Date: Thu, 20 Feb 2020 09:51:56 +0100 Subject: [PATCH] MOBILE-3352 behat: Behat basic test for assignment --- .../tests/behat/app_basic_usage.feature | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/mod/assignment/tests/behat/app_basic_usage.feature b/mod/assignment/tests/behat/app_basic_usage.feature index a858bb185..ca6a5f23a 100755 --- a/mod/assignment/tests/behat/app_basic_usage.feature +++ b/mod/assignment/tests/behat/app_basic_usage.feature @@ -131,4 +131,30 @@ Feature: Test basic usage of assignment activity in app And I should see "Not graded" And I press "Student student" near "assignment1" in the app Then I should see "Online text submission" - And I should see "Submission test 2 attempt" \ No newline at end of file + And I should see "Submission test 2 attempt" + + @app @3.8.0 @OK + Scenario: Add submission offline (online text) + 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 test" in the app + And I press "Save" in the app + 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" \ No newline at end of file