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

Use PhantomJS instead of Zombie #249

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ script:
- grunt install --db-url=sqlite:/`pwd`/.ht.sqlite --quiet
- grunt serve:test >/dev/null &
- until curl -I -XGET -s $GDT_TEST_URL 2>/dev/null | egrep -q '^HTTP.*200'; do sleep 0.5; done
- vendor/bin/phantomjs --webdriver=8643 2&>/dev/null &
- vendor/bin/drush --root=build/html en -y simpletest
- grunt test
- sleep 1; while (ps aux | grep '[b]ehat' > /dev/null); do sleep 1; done
Expand Down
2 changes: 1 addition & 1 deletion example/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"roave/security-advisories": "dev-master"
},
"require-dev": {
"behat/mink-zombie-driver": "dev-master#dd32fbd6988881dbab583225b65b787a893bb131",
"jakoch/phantomjs-installer": "^2.1",
"drupal/drupal-extension": "~3.0",
"drush/drush": "^8",
"drupal/console": "~0.10",
Expand Down
3 changes: 1 addition & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"private": true,
"dependencies": {
"grunt": "^1.0.0",
"grunt-drupal-tasks": "~1.0.0",
"zombie": "^4.2.1"
"grunt-drupal-tasks": "~1.0.0"
}
}
10 changes: 7 additions & 3 deletions example/test/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ default:
extensions:
Behat\MinkExtension:
goutte: ~
selenium2: ~
zombie: ~
# PhantomJS uses the Selenium2 mink driver.
# To run: `vendor/bin/phantomjs --webdriver=8643`
selenium2:
wd_host: "http://localhost:8643/wd/hub"
base_url: http://127.0.0.1:8080
javascript_session: 'zombie'
javascript_session: 'selenium2'
Drupal\DrupalExtension:
blackbox: ~
drush:
alias: 'local'
drupal:
drupal_root: './build/html'
api_driver: 'drupal'
region_map:
header: "#header"

ci:
formatter:
Expand Down
2 changes: 1 addition & 1 deletion tasks/behat.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = function(grunt) {
bin: path,
debug: true,
env: _.extend({}, process.env, {
BEHAT_PARAMS: "{\"extensions\": {\"Drupal\\\\DrupalExtension\": {\"drupal\": {\"drupal_root\": \"./" + config.buildPaths.html + "\"}}, \"Behat\\\\MinkExtension\": {\"base_url\": \"" + config.siteUrls[key] + "\", \"zombie\": {\"node_modules_path\": \"" + process.cwd() + "/node_modules/\"}}}}"
BEHAT_PARAMS: "{\"extensions\": {\"Drupal\\\\DrupalExtension\": {\"drupal\": {\"drupal_root\": \"./" + config.buildPaths.html + "\"}}, \"Behat\\\\MinkExtension\": {\"base_url\": \"" + config.siteUrls[key] + "\"}}}"
})
}, options)
}
Expand Down
25 changes: 25 additions & 0 deletions test/test_assets_d8/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "client/project",
"description": "{Project} drupal codebase for {client}.",
"require-dev": {
"drupal/drupal-extension": "~3.0",
"drush/drush": "dev-master",
"phpmd/phpmd": "~2.1",
"drupal/coder": "^8.2",
"guzzlehttp/guzzle" : "^6.0@dev",
"jakoch/phantomjs-installer": "2.1.1",
"symfony/dependency-injection": "2.7.*",
"symfony/event-dispatcher": "2.7.*"
},
"require": {
"roave/security-advisories": "dev-master"
},
"scripts": {
"post-install-cmd": [
"PhantomInstaller\\Installer::installPhantomJS"
],
"post-update-cmd": [
"PhantomInstaller\\Installer::installPhantomJS"
]
}
}
2 changes: 1 addition & 1 deletion test/test_assets_d8/test/features/example.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tests are meant both to verify the Drupal install as well as Behat test features
menu item is clicked.
Given I am logged in as a user with the "administrator" role
And I am on the homepage
And I click "My account"
And I click "My account" in the header
And I click "Edit"
When I fill in "pass[pass1]" with "123"
Then I should see "Password strength" in the ".form-item-pass-pass1" element
Expand Down