From dea560ab88bed4f390ce726b7555b8f2a0fa4ac8 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 08:47:09 -0700 Subject: [PATCH 01/20] Re-enable testing with the Drush Behat Endpoint. Drupal style checks are failing, though; remove them for now. --- .travis.yml | 10 +++------- composer.json | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b989be53..0210550e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,12 +37,10 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - # @todo Re-enable behat drush endpoint testing. - # @see https://github.com/jhedstrom/drupalextension/issues/458 - - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drush/drush:~9.0 symfony/dependency-injection:3.4.4 + - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) - composer install # Install drush globally. - - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~9.0 + - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev # Install the Behat Drush Endpoint for Drupal 7 tests. - test ${DRUPAL_VERSION} -ne 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -)) # Pin node version. @@ -73,9 +71,7 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - # @todo Re-enable behat drush endpoint testing. - # @see https://github.com/jhedstrom/drupalextension/issues/458 - - test ${DRUPAL_VERSION} -eq 6 || test ${DRUPAL_VERSION} -eq 8 || (test ${DRUPAL_VERSION} -eq 7 && drush help behat) + - test ${DRUPAL_VERSION} -eq 6 || drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. diff --git a/composer.json b/composer.json index 6c9243f9..dca75305 100644 --- a/composer.json +++ b/composer.json @@ -42,9 +42,11 @@ "composer validate --no-interaction", "parallel-lint src spec features fixtures", "phpcs --standard=./phpcs-ruleset.xml -p", - "phpcs --standard=./phpcs-drupal-ruleset.xml -p", "npm test", "phpspec run -f pretty --no-interaction" + ], + "removed-test": [ + "phpcs --standard=./phpcs-drupal-ruleset.xml -p" ] }, "autoload": { From 36283b9008e5a1581895fc1d577ca1d042c1779a Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 10:17:19 -0700 Subject: [PATCH 02/20] Explicitly set root when checking for the behat extension --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0210550e..795c6131 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) + - test ${DRUPAL_VERSION} -ne 8 || composer require --no-dev --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) - composer install # Install drush globally. - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev @@ -71,7 +71,7 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - - test ${DRUPAL_VERSION} -eq 6 || drush help behat + - test ${DRUPAL_VERSION} -eq 6 || drush help behat --root=drupal # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. From 5c8c9bfe7924a1f3cea414b2c1f1428f3402aae0 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 11:16:59 -0700 Subject: [PATCH 03/20] 'composer require' does not do '--no-dev' --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 795c6131..b946f7c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || composer require --no-dev --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) + - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) - composer install # Install drush globally. - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev From 8230828d968e55410ef9b0974776b044e1820168 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 14:42:01 -0700 Subject: [PATCH 04/20] Use either the 8.x or 9.x version of the Behat Drupal Extension depending on which version of Drupal we are using. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b946f7c1..6abea17b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,12 +37,12 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) + - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) - composer install # Install drush globally. - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev # Install the Behat Drush Endpoint for Drupal 7 tests. - - test ${DRUPAL_VERSION} -ne 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -)) + - test ${DRUPAL_VERSION} -ne 7 || (git clone --branch=8.x https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -)) # Pin node version. # @see http://austinpray.com/ops/2015/09/20/change-travis-node-version.html - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION From 65693c30699d0859e2a39b041d8f8c248552cc8f Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 14:56:55 -0700 Subject: [PATCH 05/20] Fix parenthesis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6abea17b..57d043d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint) + - test ${DRUPAL_VERSION} -ne 8 || (composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) - composer install # Install drush globally. - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev From 9fcf68c6ec155d2938560eaccdc38a6ad0ed5c7b Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 15:08:47 -0700 Subject: [PATCH 06/20] Diferentiate Drupal 7 and Drupal 8 tests for 'behat' command --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 57d043d2..6a1930fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,8 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - - test ${DRUPAL_VERSION} -eq 6 || drush help behat --root=drupal + - test ${DRUPAL_VERSION} -ne 7 || drush help behat + - test ${DRUPAL_VERSION} -ne 8 || drush help behat --root=drupal # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. From 0a303090fed70c6561a5c661e966d42b91df041e Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 15:45:10 -0700 Subject: [PATCH 07/20] Throw in some diagnostics --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a1930fa..d5ba1497 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,8 +71,9 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - - test ${DRUPAL_VERSION} -ne 7 || drush help behat - - test ${DRUPAL_VERSION} -ne 8 || drush help behat --root=drupal + - find ../drush -type f + - ls + - test ${DRUPAL_VERSION} -eq 6 || drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. @@ -89,8 +90,8 @@ script: - composer test - vendor/bin/behat -fprogress --strict - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict - # Do not test the Drush profile unless Drupal 7 was installed. - - test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict + # Do not test the Drush profile unless Drupal 7 or 8 were installed. + - test ${DRUPAL_VERSION} -eq 8 || vendor/bin/behat -fprogress --profile=drush --strict after_failure: - cat ~/debug.txt From 6423fa685623f2b7170f9659932933a0e1b2e44a Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 16:09:50 -0700 Subject: [PATCH 08/20] More diagnostics --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5ba1497..5bdd6a40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,8 +71,8 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - - find ../drush -type f - - ls + - test \! ${DRUPAL_VERSION} -eq 8 || drush ev 'return \Drush\Drush::config()->export();' --format=yaml + - test \! ${DRUPAL_VERSION} -eq 8 || drush list - test ${DRUPAL_VERSION} -eq 6 || drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test From 96a1fab48621e626de0cf5155b40d52ad608b6bb Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 16:23:47 -0700 Subject: [PATCH 09/20] More diagnostics --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5bdd6a40..2e966b9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,9 +71,12 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush + - test \! ${DRUPAL_VERSION} -eq 8 || which drush + - test \! ${DRUPAL_VERSION} -eq 8 || drush version + - test \! ${DRUPAL_VERSION} -eq 8 || ../vendor/bin/drush version - test \! ${DRUPAL_VERSION} -eq 8 || drush ev 'return \Drush\Drush::config()->export();' --format=yaml - test \! ${DRUPAL_VERSION} -eq 8 || drush list - - test ${DRUPAL_VERSION} -eq 6 || drush help behat + - test ${DRUPAL_VERSION} -eq 6 || ../vendor/bin/drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. @@ -91,7 +94,7 @@ script: - vendor/bin/behat -fprogress --strict - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict # Do not test the Drush profile unless Drupal 7 or 8 were installed. - - test ${DRUPAL_VERSION} -eq 8 || vendor/bin/behat -fprogress --profile=drush --strict + - test ${DRUPAL_VERSION} -eq 6 || vendor/bin/behat -fprogress --profile=drush --strict after_failure: - cat ~/debug.txt From 1374c5ea70dcc037dab0a5d050895c5792cc3a51 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 16:43:25 -0700 Subject: [PATCH 10/20] Set minimum stability for Drush --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e966b9f..5386afe2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,10 @@ sudo: false install: - composer self-update + # Temporary: set minimum stability so that we can install a dev version of Drush. + # remove and switch Drush installs to ^9.5 once that version ships. + - test \! ${DRUPAL_VERSION} -eq 8 || composer config minimum-stability dev + - test \! ${DRUPAL_VERSION} -eq 8 || composer global config minimum-stability dev # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 @@ -71,12 +75,6 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush - - test \! ${DRUPAL_VERSION} -eq 8 || which drush - - test \! ${DRUPAL_VERSION} -eq 8 || drush version - - test \! ${DRUPAL_VERSION} -eq 8 || ../vendor/bin/drush version - - test \! ${DRUPAL_VERSION} -eq 8 || drush ev 'return \Drush\Drush::config()->export();' --format=yaml - - test \! ${DRUPAL_VERSION} -eq 8 || drush list - - test ${DRUPAL_VERSION} -eq 6 || ../vendor/bin/drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. From 77a574ac009b3b11fe17edaf00ac3b985d537ae4 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 17:17:23 -0700 Subject: [PATCH 11/20] Drush 9 dev another way --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5386afe2..e30d66a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,17 +34,13 @@ sudo: false install: - composer self-update - # Temporary: set minimum stability so that we can install a dev version of Drush. - # remove and switch Drush installs to ^9.5 once that version ships. - - test \! ${DRUPAL_VERSION} -eq 8 || composer config minimum-stability dev - - test \! ${DRUPAL_VERSION} -eq 8 || composer global config minimum-stability dev # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || (composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) + - test ${DRUPAL_VERSION} -ne 8 || (composer require --prefer-source drupal/drupal-driver 'drush/drush:dev-master as 9.5.0' symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) - composer install # Install drush globally. - - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev + - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require 'drush/drush:dev-master as 9.5.0' # Install the Behat Drush Endpoint for Drupal 7 tests. - test ${DRUPAL_VERSION} -ne 7 || (git clone --branch=8.x https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -)) # Pin node version. @@ -75,6 +71,10 @@ before_script: - cd drupal - drush --yes en behat_test - drush cc drush + - test \! ${DRUPAL_VERSION} -eq 8 || drush version + - test \! ${DRUPAL_VERSION} -eq 8 || ../vendor/bin/drush version + - test \! ${DRUPAL_VERSION} -eq 8 || drush ev 'return \Drush\Drush::config()->export();' --format=yaml + - test ${DRUPAL_VERSION} -eq 6 || drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. From 8d6ffc0bbbe1dd46a271ba8c3330e85e43cd35a5 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 18:10:50 -0700 Subject: [PATCH 12/20] Rebuild with unbound version in our drupal-driver dependency. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e30d66a1..4ef73697 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,6 @@ before_script: - drush cc drush - test \! ${DRUPAL_VERSION} -eq 8 || drush version - test \! ${DRUPAL_VERSION} -eq 8 || ../vendor/bin/drush version - - test \! ${DRUPAL_VERSION} -eq 8 || drush ev 'return \Drush\Drush::config()->export();' --format=yaml - test ${DRUPAL_VERSION} -eq 6 || drush help behat # Only revert features on Drupal 7. - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test From fa6a8ceee3a23c0934f6699cbb02ff32abf8d7c2 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 20 Sep 2018 18:22:21 -0700 Subject: [PATCH 13/20] Remove unnecessary installation of drupal-driver in .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ef73697..1c2e8379 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || (composer require --prefer-source drupal/drupal-driver 'drush/drush:dev-master as 9.5.0' symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) + - test ${DRUPAL_VERSION} -ne 8 || (composer require 'drush/drush:dev-master as 9.5.0' symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) - composer install # Install drush globally. - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require 'drush/drush:dev-master as 9.5.0' From 9d6cdeee309b89f2eb35fd257f53aaf6879b09ea Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 03:41:15 -0700 Subject: [PATCH 14/20] Run the Drupal 8 tests when testing the Behat Drush Endpoint on Drupal 8 --- .travis.yml | 3 ++- behat.yml.dist | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c2e8379..c06ae747 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,8 @@ script: - vendor/bin/behat -fprogress --strict - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict # Do not test the Drush profile unless Drupal 7 or 8 were installed. - - test ${DRUPAL_VERSION} -eq 6 || vendor/bin/behat -fprogress --profile=drush --strict + - test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict + - test ${DRUPAL_VERSION} -ne 8 || vendor/bin/behat -fprogress --profile=drushDrupal8 --strict after_failure: - cat ~/debug.txt diff --git a/behat.yml.dist b/behat.yml.dist index 000eaeb6..647d2e44 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -131,3 +131,34 @@ drupal8: content: "#content" selectors: error_message_selector: '.messages--error' + + +# Separate profile for testing D8 with Drush. Assumes a stock Drupal 8 install. +drushDrupal8: + suites: + default: + contexts: + - FeatureContext + - Drupal\DrupalExtension\Context\ConfigContext + - Drupal\DrupalExtension\Context\DrupalContext + - Drupal\DrupalExtension\Context\DrushContext + - Drupal\DrupalExtension\Context\MinkContext + - Drupal\DrupalExtension\Context\MarkupContext + - Drupal\DrupalExtension\Context\MessageContext + - Drupal\DrupalExtension\Context\MailContext + - Drupal\DrupalExtension\Context\RandomContext + filters: + tags: "@d8&&~@d8wip&&@drushTest" + extensions: + Behat\MinkExtension: + base_url: http://127.0.0.1:8888 + Drupal\DrupalExtension: + api_driver: "drush" + drush_driver: "drush" + drush: + root: "drupal" + region_map: + left sidebar: "#sidebar-first" + content: "#content" + selectors: + error_message_selector: '.messages--error' From 53f7c6972316c96585389bb42ccc786eddb2a299 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 04:00:33 -0700 Subject: [PATCH 15/20] A different way --- .travis.yml | 5 ++--- behat.yml.dist | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c06ae747..9b41adfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,9 +90,8 @@ script: - composer test - vendor/bin/behat -fprogress --strict - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict - # Do not test the Drush profile unless Drupal 7 or 8 were installed. - - test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict - - test ${DRUPAL_VERSION} -ne 8 || vendor/bin/behat -fprogress --profile=drushDrupal8 --strict + # Test the Drush profile with the correct profile for the version of Drupal that was installed. + - test ${DRUPAL_VERSION} -eq 6 || vendor/bin/behat -fprogress --profile=drushDrupal${DRUPAL_VERSION} --strict after_failure: - cat ~/debug.txt diff --git a/behat.yml.dist b/behat.yml.dist index 647d2e44..df6fcf49 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -80,7 +80,7 @@ drupal7: # Separate profile for testing using the Drush driver. Assumes a stock # Drupal 7 install. -drush: +drushDrupal7: suites: default: contexts: From 8462cff0f476f37ddbe5d2a9bd77fb854db164c4 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 04:11:20 -0700 Subject: [PATCH 16/20] Remove mail context from Drush driver test --- behat.yml.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/behat.yml.dist b/behat.yml.dist index df6fcf49..db0f2573 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -145,7 +145,6 @@ drushDrupal8: - Drupal\DrupalExtension\Context\MinkContext - Drupal\DrupalExtension\Context\MarkupContext - Drupal\DrupalExtension\Context\MessageContext - - Drupal\DrupalExtension\Context\MailContext - Drupal\DrupalExtension\Context\RandomContext filters: tags: "@d8&&~@d8wip&&@drushTest" From 2719f576e7538710cacac69a8a695f68a9870672 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 04:56:40 -0700 Subject: [PATCH 17/20] Use dev version of drupal driver --- composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dca75305..33e104cd 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,12 @@ "homepage": "https://github.com/pfrenssen" } ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/greg-1-anderson/DrupalDriver" + } + ], "minimum-stability": "dev", "prefer-stable": true, "require": { @@ -27,7 +33,7 @@ "behat/mink-extension": "~2.0", "behat/mink-goutte-driver": "~1.0", "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "^2.0.0", + "drupal/drupal-driver": "dev-cr-for-9 as 2.0.0-alpha2", "symfony/dependency-injection": "~3.0", "symfony/event-dispatcher": "~3.0" }, From 25b6595714a878f3316b939519283f7996f8d98d Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 10:52:02 -0700 Subject: [PATCH 18/20] Use dev-master now that PR has been merged --- composer.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 33e104cd..552afb6d 100644 --- a/composer.json +++ b/composer.json @@ -19,12 +19,6 @@ "homepage": "https://github.com/pfrenssen" } ], - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/greg-1-anderson/DrupalDriver" - } - ], "minimum-stability": "dev", "prefer-stable": true, "require": { @@ -33,7 +27,7 @@ "behat/mink-extension": "~2.0", "behat/mink-goutte-driver": "~1.0", "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "dev-cr-for-9 as 2.0.0-alpha2", + "drupal/drupal-driver": "dev-master as 2.0.0-alpha4", "symfony/dependency-injection": "~3.0", "symfony/event-dispatcher": "~3.0" }, From ba13fbca96fe13adfff0d7b35941921ce4fdfdfd Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 21 Sep 2018 12:12:31 -0700 Subject: [PATCH 19/20] Use 2.0.0-alpha5 of drupal-driver --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 552afb6d..d5a31c83 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "behat/mink-extension": "~2.0", "behat/mink-goutte-driver": "~1.0", "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "dev-master as 2.0.0-alpha4", + "drupal/drupal-driver": "^2.0.0-alpha5", "symfony/dependency-injection": "~3.0", "symfony/event-dispatcher": "~3.0" }, @@ -43,9 +43,7 @@ "parallel-lint src spec features fixtures", "phpcs --standard=./phpcs-ruleset.xml -p", "npm test", - "phpspec run -f pretty --no-interaction" - ], - "removed-test": [ + "phpspec run -f pretty --no-interaction", "phpcs --standard=./phpcs-drupal-ruleset.xml -p" ] }, From 17ec5e7d0b2461bf12b2011a6ff7cfef2e56c0ef Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 18 Oct 2018 17:42:26 -0700 Subject: [PATCH 20/20] Require the stable version of Drush now that it has been released. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b41adfd..d902d3e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,10 +37,10 @@ install: # For Drupal 8 install the behat drush endpoint. # Pins symfony/dependency-injection to match core. # @see https://github.com/jhedstrom/drupalextension/issues/413 - - test ${DRUPAL_VERSION} -ne 8 || (composer require 'drush/drush:dev-master as 9.5.0' symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) + - test ${DRUPAL_VERSION} -ne 8 || (composer require 'drush/drush:^9.5' symfony/dependency-injection:3.4.4 && (git clone --branch=9.x https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)) - composer install # Install drush globally. - - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require 'drush/drush:dev-master as 9.5.0' + - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require 'drush/drush:^9.5' # Install the Behat Drush Endpoint for Drupal 7 tests. - test ${DRUPAL_VERSION} -ne 7 || (git clone --branch=8.x https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -)) # Pin node version.