Skip to content

Commit

Permalink
chore: Replace cypress with playwright for e2e tests (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-j-castro authored Jan 19, 2025
1 parent d47d4fc commit a7d090a
Show file tree
Hide file tree
Showing 12 changed files with 1,116 additions and 2,209 deletions.
File renamed without changes.
46 changes: 25 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true

jobs:
test:
compile-and-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -26,27 +26,31 @@ jobs:
run: npm run prettier:ci
- name: Lint
run: npm run lint:ci
- name: Build for Cypress
run: npm run build:cy
env:
CI: false
- name: Run Cypress tests
uses: cypress-io/github-action@v6
with:
browser: chrome
start: npm run serve:cy
wait-on: "http://localhost:3000"
- name: Upload Cypress screenshots
uses: actions/upload-artifact@v4
if: failure()

test-with-playwright:
needs: compile-and-lint
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- name: Upload Cypress videos
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- name: Upload playwright report
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
name: playwright-report
path: playwright/report/
retention-days: 7
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# production
/build

# Cypress
cypress/screenshots
cypress/videos

# misc
.DS_Store
Expand All @@ -24,3 +21,8 @@ cypress/videos
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Playwright
/playwright/report/
/playwright/test-results/
/playwright/.cache/
8 changes: 0 additions & 8 deletions cypress.config.ts

This file was deleted.

6 changes: 0 additions & 6 deletions cypress/e2e/render.cy.ts

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/tsconfig.json

This file was deleted.

Loading

0 comments on commit a7d090a

Please sign in to comment.