From a5e5358e56ad701dcb11665079e6f8391c33578b Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Wed, 6 Sep 2023 12:44:58 +0100 Subject: [PATCH 1/2] Fix failing Hide alert banner test Remove testing in default localgov profile This is beause the profile is testing the home page, which with the profile is now the user login page now that https://github.com/localgovdrupal/localgov/pull/613 is merged means that is the user login page. --- tests/src/FunctionalJavascript/AlertBannerHideTest.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/src/FunctionalJavascript/AlertBannerHideTest.php b/tests/src/FunctionalJavascript/AlertBannerHideTest.php index 8a9b854..fc4e2c6 100644 --- a/tests/src/FunctionalJavascript/AlertBannerHideTest.php +++ b/tests/src/FunctionalJavascript/AlertBannerHideTest.php @@ -14,11 +14,6 @@ class AlertBannerHideTest extends WebDriverTestBase { */ protected $defaultTheme = 'stark'; - /** - * {@inheritdoc} - */ - protected $profile = 'localgov'; - /** * {@inheritdoc} */ From 985612ec3ac41ba253f70b01eb32819416b9d4d7 Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Fri, 8 Sep 2023 09:40:51 +0100 Subject: [PATCH 2/2] Remove Drupal and drupalSettings from alert banner js Fix #284 In Drupal 10 it was discovered that the core/drupal and drupalSettings arn't sent by default. They should be explicitlly declared as dependencies, however we don't actully use these so we can saftley remove them for now. --- js/alert_banner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/alert_banner.js b/js/alert_banner.js index 0feb52a..44f2c8c 100644 --- a/js/alert_banner.js +++ b/js/alert_banner.js @@ -5,7 +5,7 @@ * This is so if the alert changes, the banner is reshown. */ -(function($, Drupal, drupalSettings, cookies) { +(function($, cookies) { 'use strict'; @@ -37,4 +37,4 @@ }); -}) (jQuery, Drupal, drupalSettings, window.Cookies); +}) (jQuery, window.Cookies);