Skip to content

Commit 0f9d6d3

Browse files
Initialize playwright and add some very basic end to end tests (#242)
1 parent 777b942 commit 0f9d6d3

File tree

14 files changed

+1387
-11
lines changed

14 files changed

+1387
-11
lines changed

.github/workflows/playwright.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: lts/*
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Install Playwright Browsers
19+
run: npx playwright install --with-deps
20+
- name: Run Playwright tests
21+
run: npx playwright test
22+
- uses: actions/upload-artifact@v4
23+
if: ${{ !cancelled() }}
24+
with:
25+
name: playwright-report
26+
path: playwright-report/
27+
retention-days: 30

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ yarn.lock
2727
npm-debug.log*
2828
yarn-debug.log*
2929
yarn-error.log*
30+
31+
# Playwright
32+
node_modules/
33+
/test-results/
34+
/playwright-report/
35+
/blob-report/
36+
/playwright/.cache/

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ Builds and bundles the minified app for production to the `./build` folder.
2323

2424
Your app is ready to be deployed!
2525

26+
## Testing
27+
28+
This project includes end-to-end tests using [Playwright](https://playwright.dev/) to ensure the application works correctly across different scenarios.
29+
30+
### Running Tests
31+
32+
```bash
33+
# Run all e2e tests in headless mode
34+
npm run test:e2e
35+
36+
# Run tests with visible browser (useful for debugging)
37+
npm run test:e2e:headed
38+
39+
# Open Playwright Test UI for interactive testing
40+
npm run test:e2e:ui
41+
```
42+
43+
Tests automatically start the development server if it's not already running.
44+
2645
## Get started with Docker
2746
```bash
2847
git clone https://github.com/nilsnolde/valhalla-app.git

0 commit comments

Comments
 (0)