Skip to content
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
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:

jobs:
lint:
build:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
Expand All @@ -17,3 +17,8 @@ jobs:
run: npm ci --timing
- name: Lint javascript
run: npm run lint
- name: Run tests
# aa-exec applies Ubuntu's AppArmor profile for stable Chrome binaries to the Chrome for Testing binary downloaded by Puppeteer
# Without it, Puppeteer fails with error "No usable sandbox!"
# See https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu
run: npm run test-site-dev & sleep 20; aa-exec --profile=chrome npm run cucumber
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
node_modules
output
10 changes: 9 additions & 1 deletion features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ Then run the tests against the test site:
npm run cucumber
```

## Running the tests with a debugger attached
### Running the tests with a debugger attached

```bash
npm run cucumber:debug
```

### Running the tests and generating a nicely formatted test report

```bash
npm run cucumber:report
```

Test report should be available in `output/test-results.html`.

## Configuring with environment variables

### Verbose mode
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "eslint Universal-Federated-Analytics.js",
"cucumber": "cucumber-js",
"cucumber:debug": "VERBOSE=true node --inspect-brk node_modules/@cucumber/cucumber/bin/cucumber-js",
"cucumber:report": "cucumber-js --format \"html\":\"output/test-results.html\"",
"test-site-dev": "docker build --no-cache --build-arg DAP_ENV='dev' -t dap-test-site-dev . && docker run --rm -p 8080:80 --name dap-test-site-dev dap-test-site-dev",
"test-site-stg": "docker build --no-cache --build-arg DAP_ENV='stg' -t dap-test-site-stg . && docker run --rm -p 8080:80 --name dap-test-site-stg dap-test-site-stg",
"test-site-prd": "docker build --no-cache --build-arg DAP_ENV='prd' -t dap-test-site-prd . && docker run --rm -p 8080:80 --name dap-test-site-prd dap-test-site-prd"
Expand Down
Loading