Skip to content

Commit

Permalink
Add playwright end-to-end tests
Browse files Browse the repository at this point in the history
Adds E2E playwright based tests. These allow us to test that built artifacts
work on browsers end-to-end.

Test Plan: Run `yarn test:end-to-end`

Reviewers: MonicaOlejniczak

Reviewed By: MonicaOlejniczak

Pull Request: #322
  • Loading branch information
yamadapc authored Feb 5, 2025
1 parent 0b6aa9e commit a442650
Show file tree
Hide file tree
Showing 26 changed files with 930 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,33 @@ jobs:
env:
ATLASPACK_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }}

end_to_end_tests:
name: E2E tests
timeout-minutes: 35
strategy:
matrix:
node: [20]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{ matrix.node }}
- uses: ./.github/actions/rust-toolchain
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.os }}
- name: Bump max inotify watches (Linux only)
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;
if: ${{ runner.os == 'Linux' }}
- run: yarn --frozen-lockfile
- run: yarn build-native-release
- run: yarn build
- run: yarn playwright install
- run: yarn test:e2e:ci

repl:
name: Deploy REPL
if: false # ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function isFileArg(file) {

const spec = args.some(isFileArg)
? args.filter(isFileArg)
: 'packages/*/!(integration-tests)/test/{*.{js,ts,cts,mts,cjs,mjs},**/*.{test,spec}.{js,ts,mts,cts,cjs,mjs}}';
: 'packages/*/!(integration-tests|e2e-tests)/test/{*.{js,ts,cts,mts,cjs,mjs},**/*.{test,spec}.{js,ts,mts,cts,cjs,mjs}}';

module.exports = {
spec,
Expand Down
Loading

0 comments on commit a442650

Please sign in to comment.