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

Added ability to run tagged cucumber scenarios #203

Merged
merged 1 commit into from
Nov 25, 2024
Merged
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
11 changes: 10 additions & 1 deletion cucumber.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
export default `--format-options '{"snippetInterface": "synchronous"}'`;
let cmd = `--format-options '{"snippetInterface": "synchronous"}'`;

if (process.env.TAGS) {
// @see https://cucumber.io/docs/cucumber/api/?lang=javascript#tags
cmd += ` --tags '${process.env.TAGS}'`;
}

console.log(cmd);

export default cmd;
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ services:
- MYSQL_PORT=3306
- MYSQL_DATABASE=activitypub
- NODE_ENV=testing
- TAGS
command: yarn run cucumber-js
depends_on:
fake-ghost-activitypub:
Expand Down
5 changes: 5 additions & 0 deletions docker/cucumber-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/sh

export TAGS=$1

docker compose run --rm migrate-testing up && docker compose up cucumber-tests --exit-code-from cucumber-tests
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"db": "docker compose exec mysql mysql -uroot -proot activitypub",
"fix": "docker compose down --rmi all activitypub activitypub-testing cucumber-tests nginx",
"logs": "docker compose logs activitypub -f",
"test:cucumber": "docker compose run --rm migrate-testing up && docker compose up cucumber-tests --exit-code-from cucumber-tests",
"test:cucumber": "./docker/cucumber-tests",
"test": "docker compose run --rm migrate-testing up && docker compose run --rm activitypub-testing yarn test:all && yarn test:cucumber",
"test:types": "tsc --noEmit",
"test:unit": "vitest run --dir src --coverage '.unit.test.ts'",
Expand Down