Skip to content

Commit

Permalink
Swap component tests to playwright (#670)
Browse files Browse the repository at this point in the history
* setup

* state tests (no mount)

* TabView component tests

* switch to ESM for better playwright component runner compat

This resolves an error with d3js causing issues in the tests as it is ESM only now.

* shift remaining tests to experimental component runner

* remove jest

* run test-ct

* install playwright browsers for component tests

* switch build check into separate workflow

* ct doesn't need matrix check

* Create change-pr-670.md
  • Loading branch information
jbolda authored Dec 30, 2023
1 parent 2ea024c commit 8ea59e8
Show file tree
Hide file tree
Showing 31 changed files with 12,383 additions and 18,253 deletions.
5 changes: 5 additions & 0 deletions .changes/change-pr-670.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"web": minor
---

Switch web build to ESM based. This improves compatibility with the component testing, and hopefully the greater ecosystem as other libraries began to move over.
20 changes: 20 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build check
on:
pull_request:
push:
branches: [next]

jobs:
build:
runs-on: ${{ matrix.platform }}

strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- run: npm ci
- run: npm run build
6 changes: 3 additions & 3 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
Expand All @@ -17,8 +17,8 @@ jobs:
- name: Install Playwright Browsers
run: npm run playwright install --with-deps
- name: Run Playwright tests
run: npm run playwright test
- uses: actions/upload-artifact@v3
run: npm run test-e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:

jobs:
test:
runs-on: ${{ matrix.platform }}

strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- run: npm ci
- run: npm test
- run: npm run build
- name: Install Playwright Browsers
run: npm run playwright install --with-deps -c playwright-ct.config.ts
- run: npm run test-ct
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Loading

0 comments on commit 8ea59e8

Please sign in to comment.