diff --git a/src/addons/mod/quiz/tests/behat/basic-usage-403.feature b/src/addons/mod/quiz/tests/behat/basic-usage-403.feature index 1ed062922..b5a4719eb 100644 --- a/src/addons/mod/quiz/tests/behat/basic-usage-403.feature +++ b/src/addons/mod/quiz/tests/behat/basic-usage-403.feature @@ -126,10 +126,10 @@ 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 should find "State" in the app - And I should find "Completed on" in the app - And I should find "Time taken" in the app + And I should find "Started" in the app + And I should find "Status" in the app + And I should find "Completed" in the app + And I should find "Duration" in the app And I should find "Marks" in the app And I should find "Grade" in the app And I should find "Question 1" in the app @@ -203,8 +203,9 @@ Feature: Attempt a quiz in app And I press "Submit" in the app Then I should find "Review" 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]" + When I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(2) p:nth-child(2)" with "[Started 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 date]" + And I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(4) p:nth-child(2)" with "[Duration]" Then the UI should match the snapshot Given I open a browser tab with url "$WWWROOT" diff --git a/src/addons/mod/quiz/tests/behat/basic_usage-311.feature b/src/addons/mod/quiz/tests/behat/basic_usage-311.feature index e04ec0fa6..be10f47fb 100644 --- a/src/addons/mod/quiz/tests/behat/basic_usage-311.feature +++ b/src/addons/mod/quiz/tests/behat/basic_usage-311.feature @@ -127,10 +127,10 @@ 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 should find "State" in the app - And I should find "Completed on" in the app - And I should find "Time taken" in the app + And I should find "Started" in the app + And I should find "Status" in the app + And I should find "Completed" in the app + And I should find "Duration" in the app And I should find "Marks" in the app And I should find "Grade" in the app And I should find "Question 1" in the app @@ -203,9 +203,6 @@ Feature: Attempt a quiz in app And I press "Submit" in the app Then I should find "Review" 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]" - Given I open a browser tab with url "$WWWROOT" When I am on the "quiz1" Activity page logged in as teacher1 And I follow "Attempts: 1" diff --git a/src/addons/mod/quiz/tests/behat/basic_usage.feature b/src/addons/mod/quiz/tests/behat/basic_usage.feature index 8a1a95057..d02d3e1e2 100755 --- a/src/addons/mod/quiz/tests/behat/basic_usage.feature +++ b/src/addons/mod/quiz/tests/behat/basic_usage.feature @@ -129,10 +129,10 @@ 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 should find "Completed on" in the app - And I should find "Time taken" in the app - And I should find "Finished" within "State" "ion-item" in the app + And I should find "Started" in the app + And I should find "Completed" in the app + And I should find "Duration" in the app + And I should find "Finished" within "Status" "ion-item" in the app And I should find "0 out of 1" within "Logic" "ion-item" in the app And I should find "0 out of 1" within "Cognition" "ion-item" in the app And I should find "0/2" within "Marks" "ion-item" in the app @@ -151,14 +151,14 @@ Feature: Attempt a quiz in app | \mod_quiz\event\attempt_summary_viewed | quiz | Quiz 1 | Course 1 | | When I press the back button in the app - And I press "Finished" in the app + And I press "Attempt 1" in the app Then I should find "1" within "Attempt" "ion-item" in the app - And I should find "Finished" within "State" "ion-item" in the app - And I should find "0" within "Logic / 1" "ion-item" in the app - And I should find "0" within "Cognition / 1" "ion-item" in the app - And I should find "0" within "Marks / 2" "ion-item" in the app - And I should find "0" within "Grade / 100" "ion-item" in the app - And I should find "Review" in the app + And I should find "Finished" within "Status" "ion-item" in the app + And I should find "0 out of 1" within "Logic" "ion-item" in the app + And I should find "0 out of 1" within "Cognition" "ion-item" in the app + And I should find "0/2" within "Marks" "ion-item" in the app + And I should find "0 out of 100" within "Grade" "ion-item" in the app + And I should be able to press "Review" in the app Scenario: Attempt a quiz (all question types) Given I entered the quiz activity "Quiz 2" on course "Course 1" as "student1" in the app @@ -233,8 +233,9 @@ Feature: Attempt a quiz in app When I press "Submit" in the app Then I should find "Review" 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]" + When I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(2) p:nth-child(2)" with "[Started 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 date]" + And I replace "/.*/" within "page-addon-mod-quiz-review core-loading > ion-card ion-item:nth-child(4) p:nth-child(2)" with "[Duration]" Then the UI should match the snapshot Given I open a browser tab with url "$WWWROOT" diff --git a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_27.png b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_27.png index 4dee92729..63ba23ad2 100644 Binary files a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_27.png and b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_27.png differ diff --git a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_39.png b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_39.png deleted file mode 100644 index c36de5e70..000000000 Binary files a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_39.png and /dev/null differ diff --git a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png new file mode 100644 index 000000000..679b91517 Binary files /dev/null and b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png differ