From 80c979e225e61ec4f6e4ed75165b9af805a842b8 Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Tue, 13 May 2025 16:15:49 +1000 Subject: [PATCH 1/2] add namespace to tests bootstrap --- .ahoy.yml | 11 ++++++++++- behat.yml | 10 ++++++++-- composer.dev.json | 3 +++ tests/behat/bootstrap/FeatureContext.php | 2 ++ tests/behat/bootstrap/TideCommonTrait.php | 1 + tests/behat/bootstrap/TideEntityTrait.php | 1 + tests/behat/bootstrap/TideExtensionsTrait.php | 1 + 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.ahoy.yml b/.ahoy.yml index 68e4dfe..34c66c1 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -14,7 +14,16 @@ commands: && if [ "$COMPOSER" != "composer.json" ] && [ "$DRUPAL_PROFILE" ]; then ahoy init-profile; fi \ && ahoy install-site \ && if [ "$COMPOSER" != "composer.json" ]; then ahoy init-module; fi \ - && if [ "$COMPOSER" != "composer.json" ]; then ahoy drush pm-enable tide_test -y; fi \ + && if [ "$COMPOSER" != "composer.json" ]; then \ + ahoy drush pm-enable \ + tide_test \ + tide_landing_page \ + tide_site \ + tide_event \ + tide_news \ + tide_grant \ + -y; \ + fi \ && ahoy line "Build complete" \ && ahoy info 1 diff --git a/behat.yml b/behat.yml index 82888aa..8901f2b 100644 --- a/behat.yml +++ b/behat.yml @@ -7,9 +7,15 @@ default: tags: "~@suggest&&~@skipped" suites: default: - paths: [ '%paths.base%/tests/behat/features' ] + paths: + - '%paths.base%/tests/behat/features' + - '%paths.base%/modules/tide_event/tests/behat/features' + - '%paths.base%/modules/tide_news/tests/behat/features' + - '%paths.base%/modules/tide_grant/tests/behat/features' + - '%paths.base%/modules/tide_site/tests/behat/features' + - '%paths.base%/modules/tide_landing_page/tests/behat/features' contexts: - - FeatureContext + - Tide\Tests\Context\FeatureContext - Drupal\DrupalExtension\Context\MinkContext - Drupal\DrupalExtension\Context\MarkupContext - Drupal\DrupalExtension\Context\MessageContext diff --git a/composer.dev.json b/composer.dev.json index 2c3ecf7..4aff4c0 100644 --- a/composer.dev.json +++ b/composer.dev.json @@ -44,6 +44,9 @@ "drupal/ckeditor": "*" }, "autoload": { + "psr-4": { + "Tide\\Tests\\Context\\": "tests/behat/bootstrap/" + }, "classmap": [ "scripts/composer/" ] diff --git a/tests/behat/bootstrap/FeatureContext.php b/tests/behat/bootstrap/FeatureContext.php index a56f6b0..999f90d 100644 --- a/tests/behat/bootstrap/FeatureContext.php +++ b/tests/behat/bootstrap/FeatureContext.php @@ -5,6 +5,8 @@ * Feature context for Behat testing. */ +namespace Tide\Tests\Context; + use DrevOps\BehatSteps\ContentTrait; use DrevOps\BehatSteps\FieldTrait; use DrevOps\BehatSteps\JsTrait; diff --git a/tests/behat/bootstrap/TideCommonTrait.php b/tests/behat/bootstrap/TideCommonTrait.php index 40dc4b7..3d6f1a3 100644 --- a/tests/behat/bootstrap/TideCommonTrait.php +++ b/tests/behat/bootstrap/TideCommonTrait.php @@ -1,5 +1,6 @@ Date: Tue, 13 May 2025 16:48:40 +1000 Subject: [PATCH 2/2] add more core modules to the test list. --- .ahoy.yml | 5 +++++ behat.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.ahoy.yml b/.ahoy.yml index 34c66c1..3a0f683 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -22,6 +22,11 @@ commands: tide_event \ tide_news \ tide_grant \ + tide_api \ + tide_media \ + tide_webform \ + tide_publication \ + tide_alert \ -y; \ fi \ && ahoy line "Build complete" \ diff --git a/behat.yml b/behat.yml index 8901f2b..d6ff4c1 100644 --- a/behat.yml +++ b/behat.yml @@ -14,6 +14,11 @@ default: - '%paths.base%/modules/tide_grant/tests/behat/features' - '%paths.base%/modules/tide_site/tests/behat/features' - '%paths.base%/modules/tide_landing_page/tests/behat/features' + - '%paths.base%/modules/tide_api/tests/behat/features' + - '%paths.base%/modules/tide_media/tests/behat/features' + - '%paths.base%/modules/tide_webform/tests/behat/features' + - '%paths.base%/modules/tide_publication/tests/behat/features' + - '%paths.base%/modules/tide_alert/tests/behat/features' contexts: - Tide\Tests\Context\FeatureContext - Drupal\DrupalExtension\Context\MinkContext