diff --git a/src/addons/mod/quiz/tests/behat/basic_usage.feature b/src/addons/mod/quiz/tests/behat/basic_usage.feature index af30c5a58eb..06bd285abde 100755 --- a/src/addons/mod/quiz/tests/behat/basic_usage.feature +++ b/src/addons/mod/quiz/tests/behat/basic_usage.feature @@ -124,8 +124,9 @@ Feature: Attempt a quiz in app When I press "Submit all and finish" in the app And I press "Submit" near "Once you submit" in the app - Then I should find "Review" in the app - And I should find "Started on" in the app + And I run all adhoc tasks + And I pull to refresh until I find "Review" in the app + Then I should find "Started on" in the app And I should find "State" in the app And I should find "Completed on" in the app And I should find "Time taken" in the app @@ -182,8 +183,9 @@ Feature: Attempt a quiz in app Then I should find "Questions without a response: 1" in the app When I press "Submit" in the app - Then I should find "Review" in the app - And I should find "Finished" in the app + And I run all adhoc tasks + And I pull to refresh until I find "Review" in the app + Then I should find "Finished" in the app And I should find "Not yet graded" in the app When I press "Correct" within "Question 2" "ion-card" in the app @@ -206,6 +208,8 @@ Feature: Attempt a quiz in app When I press "Submit" in the app Then I should find "Review" in the app + And I should find "Finished" within "State" "ion-item" in the app + And I should find "Not yet graded" within "Grade" "ion-item" in the app When I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(1) p:nth-child(2)" with "[Started on date]" And I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(3) p:nth-child(2)" with "[Completed on date]" @@ -218,5 +222,17 @@ Feature: Attempt a quiz in app And I log in as "teacher1" And I follow "Attempts: 1" And I follow "Review attempt" + And I should see "Submitted" + And I should not see "1.00/2.00" + And I run all adhoc tasks + And I reload the page Then I should see "Finished" And I should see "1.00/2.00" + And I switch back to the app + And I entered the quiz activity "Quiz 1" on course "Course 1" as "student1" in the app + And I pull to refresh until I find "Highest grade: 50 / 100" in the app + And I should not find "Not yet graded" in the app + And I press "1" in the app + And I should find "Finished" within "State" "ion-item" in the app + And I should find "1" within "Marks / 2" "ion-item" in the app + And I should find "50" within "Grade / 100" "ion-item" in the app diff --git a/src/addons/mod/quiz/tests/behat/quiz_behaviour.feature b/src/addons/mod/quiz/tests/behat/quiz_behaviour.feature index 82282206c11..772ec567c9c 100644 --- a/src/addons/mod/quiz/tests/behat/quiz_behaviour.feature +++ b/src/addons/mod/quiz/tests/behat/quiz_behaviour.feature @@ -104,8 +104,9 @@ Feature: Use quizzes with different behaviours in the app And I press "Submit" in the app And I press "Submit all and finish" in the app And I press "Submit" near "Once you submit" in the app - Then I should find "CBM mark 1.50" in the app - And I should find "Parts, but only parts, of your response are correct" in the app + And I run all adhoc tasks + And I pull to refresh until I find "CBM mark 1.50" in the app + Then I should find "Parts, but only parts, of your response are correct" in the app Scenario: Interactive behaviour Given the following "activities" exist: