From 12da416a51900ccaff4bcf4def3c03375696ed16 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 14 Mar 2022 14:48:37 +0100 Subject: [PATCH 1/2] MOBILE-3833 behat: Update course summary pages --- mod/course/tests/behat/app_basic_usage.feature | 2 +- mod/courses/tests/behat/app_basic_usage.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/course/tests/behat/app_basic_usage.feature b/mod/course/tests/behat/app_basic_usage.feature index 2caa3442f..f1516594d 100755 --- a/mod/course/tests/behat/app_basic_usage.feature +++ b/mod/course/tests/behat/app_basic_usage.feature @@ -453,7 +453,7 @@ Feature: Test basic usage of one course in app Then I should find "Course summary" in the app And I should find "Course" in the app - When I press "Course" "ion-button" in the app + When I press "View course" "ion-button" in the app Then the header should be "Course 1" in the app And I should find "Choice course 1" in the app And I should find "assignment" in the app diff --git a/mod/courses/tests/behat/app_basic_usage.feature b/mod/courses/tests/behat/app_basic_usage.feature index 5cb9f3953..fc59c4fbb 100755 --- a/mod/courses/tests/behat/app_basic_usage.feature +++ b/mod/courses/tests/behat/app_basic_usage.feature @@ -88,7 +88,7 @@ Feature: Test basic usage of courses in app When I press "Course 4" in the app Then I should find "Course 4" in the app - And the header should be "Course summary" in the app + And I should find "Course summary" in the app When I press the back button in the app And I set the field "Search" to "Course" in the app From 9997217214317c6e1b784a0f542d16a32d5f3843 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 14 Mar 2022 14:49:50 +0100 Subject: [PATCH 2/2] MOBILE-3833 behat: Delay verifying item selection Before this fix it was happening too fast some times and giving false negatives --- tests/behat/behat_app.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/behat/behat_app.php b/tests/behat/behat_app.php index 603e298d2..a2737f79a 100644 --- a/tests/behat/behat_app.php +++ b/tests/behat/behat_app.php @@ -811,6 +811,8 @@ class behat_app extends behat_base { } // Check that it worked as expected. + usleep(1000000); + $result = $this->evaluate_script("return window.behat.isSelected($locatorjson);"); switch ($result) {