-
Notifications
You must be signed in to change notification settings - Fork 3
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
Test js behat #141
Test js behat #141
Conversation
Greetings, @agentrickard and @iajon! I thought I'd join the good fight here. I think I finally figured out why Behat is still looking for Selenium at port This has been a longstanding issue, and I dug up this gem from 2018, which I have absolutely no recollection of, but there it is: It references palantirnet/the-vagrant#62 which is similar to what we're trying to do. Port |
Boom shakalaka! This PR will need to be reviewed, merged, and a new release cut of the-build: Then, this line will need to be changed to match the new build version: Also, I haven't tested to see if I broke the local Behat JS functionality. |
Also, I think there's an open question of whether this functionality requires the-build. We test this on CircleCI with the-build, and I don't know if there are any cases where we use the skeleton without the-build, but technically it should work. In this case, we will need to update the Otherwise, new projects created with this skeleton won't run JS tests. |
@iajon We decided that we should remove the behat.yml file from drupal-skeleton and use the one from the-build. We do need both circle configs, though. |
.circleci/config.yml
Outdated
- run: | ||
name: Run code reviews | ||
command: vendor/bin/phing code-review | ||
name: Install the-build in the project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agentrickard @byrond I tried to commit the newest version of the CircleCI config, but it fails at vendor/bin/phing code-review
. The previous version (latest commit) runs vendor/bin/the-build-installer
which adds build.xml
to the project root. The newest version doesn't run the installer before calling vendor/bin/phing code-review
.
Since we are moving behat.yml
out of the skeleton, I figure we probably want to fix this in the-build
rather than committing build.xml
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iajon I don't quite follow the logic of this comment, other than to say that yes, the order that things run needs to be settled.
Both projects needs their own circleci config files and they need to match as closely as possible, since the-build-installer will also overwrite the circle config. But it may be that the order in which things run in drupal-skeleton is slightly different.
Only the-build needs build.xml and behat.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready once we merge the-build change and make these two updates.
.circleci/config.yml
Outdated
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 & | ||
vendor/bin/behat --profile=circleci --suite=default --strict --format=junit --out=/tmp/artifacts | ||
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 & | ||
google-chrome --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't actually need this line. Its for debugging.
composer.json
Outdated
"drupal/core-dev": "^10", | ||
"drupal/drupal-extension": "^5@alpha", | ||
"palantirnet/the-build": "^4@beta" | ||
"palantirnet/the-build": "dev-headless-chrome" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to merge the-build change first, and then update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agentrickard I tagged a new beta release of the-build: https://github.com/palantirnet/the-build/releases/tag/4.0-beta5
I wonder why this failed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iajon We need to start the webserver to run the tests.
.circleci/config.yml
Outdated
@@ -99,8 +99,6 @@ jobs: | |||
- run: | |||
name: Run Behat tests | |||
command: | | |||
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this nohup
command to start the web server
.circleci/config.yml
Outdated
@@ -99,8 +99,6 @@ jobs: | |||
- run: | |||
name: Run Behat tests | |||
command: | | |||
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/web/ > /tmp/artifacts/phpd.log 2>&1 & | |||
google-chrome --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This we can delete
User story: This is the test branch for JS behat setup.
Description
Checkout the
test-js-behat
branchSee the file changes in the PR