Skip to content

Commit

Permalink
test: run e2e tests with playwright (#116)
Browse files Browse the repository at this point in the history
* test: run e2e tests with playwright

* Small update
  • Loading branch information
ocavue authored Nov 29, 2024
1 parent 08457a9 commit 1271018
Show file tree
Hide file tree
Showing 31 changed files with 311 additions and 1,697 deletions.
37 changes: 9 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,15 @@ jobs:
- name: Lint
run: pnpm run lint

- name: Install cypress
run: pnpm run install:cypress
- name: Install browsers
run: pnpm run test:install

- name: Setup firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest-esr

- name: Run e2e test on chrome
uses: cypress-io/github-action@v6
env:
CYPRESS_SERVER_PORT: 7000
CYPRESS_PORT: 8000
with:
install: false
working-directory: e2e
start: pnpm exec vite preview --port 7000 --host
wait-on: 'http://localhost:7000'
browser: chrome
- name: Run e2e tests
run: pnpm run test

- name: Run e2e test on firefox
uses: cypress-io/github-action@v6
env:
CYPRESS_SERVER_PORT: 7001
CYPRESS_PORT: 8000
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
install: false
working-directory: e2e
start: pnpm exec vite preview --port 7001 --host
wait-on: 'http://localhost:7001'
browser: firefox
name: playwright-report
path: e2e/playwright-report/
retention-days: 7
16 changes: 0 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Export screenshots (on failure only)
uses: actions/[email protected]
if: ${{ failure() }}
with:
name: cypress-screenshots
path: e2e/cypress/screenshots
retention-days: 7

- name: Export screen recordings (on failure only)
uses: actions/[email protected]
if: ${{ failure() }}
with:
name: cypress-videos
path: e2e/cypress/videos
retention-days: 7
4 changes: 4 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
7 changes: 0 additions & 7 deletions e2e/cypress.config.ts

This file was deleted.

34 changes: 0 additions & 34 deletions e2e/cypress/e2e/lit/node-view.cy.ts

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/cypress/e2e/lit/plugin-view.cy.ts

This file was deleted.

25 changes: 0 additions & 25 deletions e2e/cypress/e2e/lit/widget-view.cy.ts

This file was deleted.

34 changes: 0 additions & 34 deletions e2e/cypress/e2e/react/node-view.cy.ts

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/cypress/e2e/react/plugin-view.cy.ts

This file was deleted.

25 changes: 0 additions & 25 deletions e2e/cypress/e2e/react/widget-view.cy.ts

This file was deleted.

34 changes: 0 additions & 34 deletions e2e/cypress/e2e/solid/node-view.cy.ts

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/cypress/e2e/solid/plugin-view.cy.ts

This file was deleted.

25 changes: 0 additions & 25 deletions e2e/cypress/e2e/solid/widget-view.cy.ts

This file was deleted.

34 changes: 0 additions & 34 deletions e2e/cypress/e2e/svelte/node-view.cy.ts

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/cypress/e2e/svelte/plugin-view.cy.ts

This file was deleted.

Loading

0 comments on commit 1271018

Please sign in to comment.