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
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ yarn-error.log*

# https://github.com/facebook/create-react-app/issues/6560
src/*.d.ts

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ npm start

The app will now be running locally at http://localhost:3000

### Testing

Simply run tests: `npm t`

Run interactive tests: `npm test:ui`

Run a specific test: `npx playwright test --grep "test name"`

Run tests for debugging: `npx playwright test --trace on`

See [playwright CLI](https://playwright.dev/docs/test-cli) and use `npx playwright ...` for more complex usage

### Configuration

Expand All @@ -46,7 +57,6 @@ The app will now be running locally at http://localhost:3000
| SYNTHETICMASS_API_KEY | The API key to use for accessing the SyntheticMass API. Not required except for the SyntheticMass Browser |
| FRONTEND_ONLY | When `true` this disables the backend server and the features that depend on it. This is primarily used to allow for deploying only a static UI, for example to GitHub Pages |


# License

Copyright 2021 The MITRE Corporation
Expand Down
Loading
Loading