From 6548346dca9392ea1ffe447f061c8c3d03a72ed3 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 1 Feb 2024 13:46:10 +0100 Subject: [PATCH 1/2] MOBILE-4470 core: Default to reduced motion in old devices --- src/core/services/platform.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/services/platform.ts b/src/core/services/platform.ts index a029de0b4..c08089d06 100644 --- a/src/core/services/platform.ts +++ b/src/core/services/platform.ts @@ -95,7 +95,8 @@ export class CorePlatformService extends Platform { * @returns Whether the device is configured to reduce motion. */ prefersReducedMotion(): boolean { - return window.matchMedia('(prefers-reduced-motion: reduce)').matches; + // Default to reduced motion in devices that don't support this CSS property. + return !window.matchMedia('(prefers-reduced-motion: no-preference)').matches; } /** From 2e4293a6333e750ee789afafb5073ec331da5b41 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 1 Feb 2024 13:48:24 +0100 Subject: [PATCH 2/2] MOBILE-4470 behat: Add error message details --- local_moodleappbehat/tests/behat/behat_app_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local_moodleappbehat/tests/behat/behat_app_helper.php b/local_moodleappbehat/tests/behat/behat_app_helper.php index ad25bddb4..14932534a 100644 --- a/local_moodleappbehat/tests/behat/behat_app_helper.php +++ b/local_moodleappbehat/tests/behat/behat_app_helper.php @@ -234,7 +234,7 @@ class behat_app_helper extends behat_base { $this->runtime_js("init($initoptions)"); } catch (Exception $error) { - throw new DriverException('Moodle App not running or not running on Automated mode.'); + throw new DriverException('Moodle App not running or not running on Automated mode: ' . $error->getMessage()); } if ($restart) {