From a1fa25c0e4f85f1bae8439dfcc6657e9d0aa0150 Mon Sep 17 00:00:00 2001 From: Claudiu Cristea Date: Wed, 6 Dec 2023 14:50:52 +0200 Subject: [PATCH] Add back Drupal 9 support --- .github/workflows/ci.yml | 23 +++++++++++++++++++---- behat.yml.dist | 31 +++++++++++++++++++++++++++++-- composer.json | 2 +- features/d8.feature | 12 +++++++++++- features/i18n/es/d8.feature | 11 ++++++++++- 5 files changed, 70 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7575dd68..874e8c6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,19 @@ jobs: strategy: fail-fast: false matrix: - php_version: ["8.1", "8.2"] - drupal_version: ["10.0", "10.1"] + php_version: ["7.4", "8.0", "8.1", "8.2"] + drupal_version: ["9", "10.0", "10.1"] + exclude: + - php_version: "7.4" + drupal_version: "10.0" + - php_version: "7.4" + drupal_version: "10.1" + - php_version: "8.0" + drupal_version: "10.0" + - php_version: "8.0" + drupal_version: "10.1" + - php_version: "8.2" + drupal_version: "9" env: PHP_VERSION: ${{ matrix.php_version }} DRUPAL_VERSION: ${{ matrix.drupal_version }} @@ -39,7 +50,11 @@ jobs: run: docker-compose exec -T php composer test - name: behat --profile=blackbox run: docker-compose exec -T php vendor/bin/behat -fprogress --strict - - name: behat --profile=drupal - run: docker-compose exec -T php cat && docker-compose exec -T php vendor/bin/behat -fprogress --profile=drupal --strict + - name: behat --profile=drupal9 + if: "${{ matrix.drupal_version == '9'}}" + run: docker-compose exec -T php cat && docker-compose exec -T php vendor/bin/behat -fprogress --profile=drupal9 --strict + - name: behat --profile=drupal10 + if: "${{ matrix.drupal_version != '9'}}" + run: docker-compose exec -T php cat && docker-compose exec -T php vendor/bin/behat -fprogress --profile=drupal10 --strict - name: behat --profile=drupal_https run: docker-compose exec -T php cat && docker-compose exec -T php vendor/bin/behat -fprogress --profile=drupal_https --strict diff --git a/behat.yml.dist b/behat.yml.dist index 6e36104a..d609a909 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -29,7 +29,7 @@ default: success_message_selector: '.messages.status' warning_message_selector: '.messages.warning' -drupal: +drupal9: suites: default: contexts: @@ -42,7 +42,34 @@ drupal: - Drupal\DrupalExtension\Context\MailContext - Drupal\DrupalExtension\Context\RandomContext filters: - tags: "~@blackbox&&~@wip" + tags: "~@blackbox&&~@wip&&~d10" + extensions: + Drupal\MinkExtension: + base_url: http://proxy + files_path: /var/www/html/fixtures/files + Drupal\DrupalExtension: + api_driver: "drupal" + drupal: + drupal_root: "/var/www/html/drupal" + region_map: + main content: "#main" + selectors: + error_message_selector: '.messages--error' + +drupal10: + suites: + default: + contexts: + - FeatureContext + - Drupal\DrupalExtension\Context\ConfigContext + - Drupal\DrupalExtension\Context\DrupalContext + - Drupal\DrupalExtension\Context\MinkContext + - Drupal\DrupalExtension\Context\MarkupContext + - Drupal\DrupalExtension\Context\MessageContext + - Drupal\DrupalExtension\Context\MailContext + - Drupal\DrupalExtension\Context\RandomContext + filters: + tags: "~@blackbox&&~@wip&&~d9" extensions: Drupal\MinkExtension: base_url: http://proxy diff --git a/composer.json b/composer.json index 132a9702..92b0c7d7 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "drupal/coder": "^8.3", "drupal/core": "^10", "drupal/core-composer-scaffold": "^10", - "drush/drush": "^12.4", + "drush/drush": "^11.6.0 || ^12.4", "php-parallel-lint/php-parallel-lint": "^1.3", "phpspec/phpspec": "^4.0 || ^6.0 || ^7.0" }, diff --git a/features/d8.feature b/features/d8.feature index 946a0dfa..673e7712 100644 --- a/features/d8.feature +++ b/features/d8.feature @@ -4,8 +4,18 @@ Feature: DrupalContext As a developer I need to use the step definitions of this context + @d9 @https - Scenario: Target links within table rows + Scenario: Target links within table rows (Drupal 9) + Given I am logged in as a user with the "administrator" role + When I am at "admin/structure/types" + And I click "Manage fields" in the "Article" row + Then I should be on "admin/structure/types/manage/article/fields" + And I should see the link "Add field" + + @d10 + @https + Scenario: Target links within table rows (Drupal 10) Given I am logged in as a user with the "administrator" role When I am at "admin/structure/types" And I click "Manage fields" in the "Article" row diff --git a/features/i18n/es/d8.feature b/features/i18n/es/d8.feature index f7097ed5..8137dfd7 100644 --- a/features/i18n/es/d8.feature +++ b/features/i18n/es/d8.feature @@ -13,7 +13,16 @@ Característica: DrupalContext Cuando hago click en "My account" Entonces debo ver el texto "Member for" - Escenario: Enlaces dentro de filas de tablas + @d9 + Escenario: Enlaces dentro de filas de tablas (Drupal 9) + Dado que estoy conectado como un "administrator" + Cuando estoy en la URL "admin/structure/types" + Y hago click en el enlace "Manage fields" de la fila "Article" + Entonces debo estar en "admin/structure/types/manage/article/fields" + Y debo ver el enlace "Add field" + + @d10 + Escenario: Enlaces dentro de filas de tablas (Drupal 10) Dado que estoy conectado como un "administrator" Cuando estoy en la URL "admin/structure/types" Y hago click en el enlace "Manage fields" de la fila "Article"