From c3e713137dc58bee053d8acba48aaca1b033086a Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Tue, 13 Jun 2023 12:19:38 +0200 Subject: [PATCH 1/2] MOBILE-4362 behat: Fix tests in headless mode Headless mode was using a smaller window size which caused the course index to be hidden by default, and that's what made tests fail. --- .../lesson/tests/behat/numerical_decimal_separator-311.feature | 1 + .../mod/lesson/tests/behat/numerical_decimal_separator.feature | 1 + 2 files changed, 2 insertions(+) diff --git a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature index 5f9977ab5..16ce86941 100755 --- a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature +++ b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature @@ -19,6 +19,7 @@ Feature: Test decimal separators in lesson | lesson | Offline lesson | Offline lesson descr | C1 | lesson | 1 | 1 | 9 | 1 | 1 | # Currently there are no generators for pages. See MDL-77581. And I log in as "teacher1" + And I change window size to "small" And I am on "Course 1" course homepage And I follow "Basic lesson" And I follow "Add a question page" diff --git a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature index f37882d91..f48b65814 100755 --- a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature +++ b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature @@ -19,6 +19,7 @@ Feature: Test decimal separators in lesson | lesson | Offline lesson | Offline lesson descr | C1 | lesson | 1 | 1 | 9 | 1 | 1 | # Currently there are no generators for pages. See MDL-77581. And I log in as "teacher1" + And I change window size to "small" And I am on "Course 1" course homepage And I follow "Basic lesson" And I follow "Add a question page" From a894241e05504a981b68783ea3f0b2eef56188f6 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Tue, 13 Jun 2023 12:24:00 +0200 Subject: [PATCH 2/2] MOBILE-4362 behat: Skip background steps --- .../lesson/tests/behat/numerical_decimal_separator-311.feature | 3 ++- .../mod/lesson/tests/behat/numerical_decimal_separator.feature | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature index 16ce86941..982f6f88b 100755 --- a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature +++ b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator-311.feature @@ -2,7 +2,8 @@ Feature: Test decimal separators in lesson Background: - Given the following "users" exist: + Given the Moodle site is compatible with this feature + And the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | teacher | teacher1@example.com | | student1 | Student | student | student1@example.com | diff --git a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature index f48b65814..5753305d7 100755 --- a/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature +++ b/src/addons/mod/lesson/tests/behat/numerical_decimal_separator.feature @@ -2,7 +2,8 @@ Feature: Test decimal separators in lesson Background: - Given the following "users" exist: + Given the Moodle site is compatible with this feature + And the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | teacher | teacher1@example.com | | student1 | Student | student | student1@example.com |