Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable testing with the Drush Behat Endpoint. #506

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dea560a
Re-enable testing with the Drush Behat Endpoint. Drupal style checks …
greg-1-anderson Sep 20, 2018
36283b9
Explicitly set root when checking for the behat extension
greg-1-anderson Sep 20, 2018
5c8c9bf
'composer require' does not do '--no-dev'
greg-1-anderson Sep 20, 2018
8230828
Use either the 8.x or 9.x version of the Behat Drupal Extension depen…
greg-1-anderson Sep 20, 2018
65693c3
Fix parenthesis
greg-1-anderson Sep 20, 2018
9fcf68c
Diferentiate Drupal 7 and Drupal 8 tests for 'behat' command
greg-1-anderson Sep 20, 2018
0a30309
Throw in some diagnostics
greg-1-anderson Sep 20, 2018
6423fa6
More diagnostics
greg-1-anderson Sep 20, 2018
96a1fab
More diagnostics
greg-1-anderson Sep 20, 2018
1374c5e
Set minimum stability for Drush
greg-1-anderson Sep 20, 2018
77a574a
Drush 9 dev another way
greg-1-anderson Sep 21, 2018
8d6ffc0
Rebuild with unbound version in our drupal-driver dependency.
greg-1-anderson Sep 21, 2018
fa6a8ce
Remove unnecessary installation of drupal-driver in .travis.yml
greg-1-anderson Sep 21, 2018
9d6cdee
Run the Drupal 8 tests when testing the Behat Drush Endpoint on Drupal 8
greg-1-anderson Sep 21, 2018
53f7c69
A different way
greg-1-anderson Sep 21, 2018
8462cff
Remove mail context from Drush driver test
greg-1-anderson Sep 21, 2018
2719f57
Use dev version of drupal driver
greg-1-anderson Sep 21, 2018
25b6595
Use dev-master now that PR has been merged
greg-1-anderson Sep 21, 2018
ba13fbc
Use 2.0.0-alpha5 of drupal-driver
greg-1-anderson Sep 21, 2018
17ec5e7
Require the stable version of Drush now that it has been released.
greg-1-anderson Oct 19, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +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
# @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 '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:~9.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 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
Expand Down Expand Up @@ -73,9 +71,9 @@ 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 8 || drush version
- test \! ${DRUPAL_VERSION} -eq 8 || ../vendor/bin/drush version
- 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.
Expand All @@ -92,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
# 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
32 changes: 31 additions & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ drupal7:

# Separate profile for testing using the Drush driver. Assumes a stock
# Drupal 7 install.
drush:
drushDrupal7:
suites:
default:
contexts:
Expand Down Expand Up @@ -131,3 +131,33 @@ 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\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'
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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": "^2.0.0-alpha5",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go back to ^2.0.0 I think?

Suggested change
"drupal/drupal-driver": "^2.0.0-alpha5",
"drupal/drupal-driver": "^2.0.0",

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ^2.1.0 now to match master.

"symfony/dependency-injection": "~3.0",
"symfony/event-dispatcher": "~3.0"
},
Expand All @@ -42,9 +42,9 @@
"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"
"phpspec run -f pretty --no-interaction",
"phpcs --standard=./phpcs-drupal-ruleset.xml -p"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit can be undone now I think.

]
},
"autoload": {
Expand Down