Skip to content
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
23 changes: 23 additions & 0 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Browser tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
selenium:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Use Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '26.x'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Selenium tests
run: npm run test:e2e
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,15 @@ Run the dev server:
npm run develop
```

Lint and run the tests (CI runs both on every PR):
Lint and run the tests (CI runs all of them on every PR):
```
npm run lint
npm test
npm run build && npm run test:e2e
```

The browser tests use [Selenium](https://www.selenium.dev/documentation/webdriver/) and Chrome. Selenium Manager finds or downloads Chrome and chromedriver. To use a local install instead, set `CHROME_BIN` and `CHROMEDRIVER`.

Send us a PR / create an issue. If you have a big change coming up, please discuss it with us in an issue first.

## Deploy your own version
Expand Down
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@ export default [
languageOptions: {
globals: { ...globals.node }
}
},
{
// Functions passed to executeScript run in the browser
files: ['test/e2e/**/*.js'],
languageOptions: {
globals: { ...globals.browser }
}
}
];
178 changes: 178 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@
"@eslint/js": "^10.0.1",
"eslint": "^10.13.0",
"globals": "^17.13.0",
"selenium-webdriver": "^4.51.0",
"vite": "^6.0.0"
},
"scripts": {
"build": "vite build",
"develop": "vite",
"lint": "eslint . --max-warnings 0",
"preview": "vite preview",
"test": "node --test 'test/*.test.js'"
"test": "node --test 'test/*.test.js'",
"test:e2e": "node --test 'test/e2e/*.test.js'"
}
}
Loading
Loading