Skip to content

Commit

Permalink
Release 13.1.0 (#504)
Browse files Browse the repository at this point in the history
## What's changed

* feat: introducing playwright tests
([#424](#424))
  • Loading branch information
puehringer authored Sep 6, 2024
2 parents 9ba44c4 + 8574737 commit b549bbd
Show file tree
Hide file tree
Showing 85 changed files with 2,386 additions and 332 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ on:
required: false
type: boolean
default: true
cypress:
description: 'Run cypress'
playwright:
description: 'Run playwright'
required: false
type: boolean
default: false
playwright_spec_param:
type: string
description: 'Run specific playwright test(s) (optional). Example: landing-page.spec.ts'
required: false
chromatic:
description: 'Run chromatic'
required: false
type: boolean
default: false
push:
pull_request:
pull_request:
types: [opened, ready_for_review]
pull_request_review:
types: [submitted]
Expand All @@ -38,9 +42,10 @@ jobs:
# To get on push true, use !contains(inputs.myInput, 'false')
# To get on push false, use contains(inputs.myInput, 'true')
with:
run_parallel: ${{ !contains(inputs.run_parallel, 'false') }} # true except if box is not checked
runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
run_parallel: ${{ !contains(inputs.run_parallel, 'false') }} # true except if box is not checked
runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
chromatic_enable: ${{ inputs.chromatic == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }}
cypress_enable: true
cypress_run_because_flag: ${{ inputs.cypress == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }}
cypress_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
playwright_enable: true
playwright_run_because_flag: ${{ inputs.playwright == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }}
playwright_spec_param: ${{ inputs.playwright_spec_param }}
playwright_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
12 changes: 8 additions & 4 deletions .github/workflows/build_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ jobs:
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main
secrets: inherit
with:
cypress_enable: true
cypress_run_because_flag: true
playwright_enable: true
playwright_run_because_flag: true
playwright_runs_on: self-hosted
deduplication_id: main
branch: main
build-develop:
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main
secrets: inherit
with:
cypress_enable: true
cypress_run_because_flag: true
playwright_enable: true
playwright_run_because_flag: true
playwright_runs_on: self-hosted
deduplication_id: develop
branch: develop
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@ node_modules/
!.yarn/versions

# env
/.venv*/
/.venv*/
/blob-report/

# playwright
/test-results/
/playwright-report/
/playwright/.cache/
/playwright/.auth/
/playwright/download-test-results/

# chromatic
chromatic-diagnostics.json
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ yarn run test
make test
```

### Playwright and Chromatic

To run all tests and create snapshots, execute Playwright first. With this command all snapshots are already taken and captured in an archive. Make sure to commit all your changes before taking any snapshots.
Before executing this command, make sure backend and frontend are running smoothly.

```bash
yarn pw:run
```

To upload these snapshots to Chromatic’s cloud and review them, execute:

```bash
yarn chromatic --playwright -t=<TOKEN>
```

Chromatic creates for every test a story in storybook, although these are not responsive. When clicking on the link in the terminal, all changes can be reviewed and storybook can be opened.

Playwright documentation: [https://playwright.dev/docs/intro](https://playwright.dev/docs/intro)

Chromatic with Playwright: [https://www.chromatic.com/docs/playwright/](https://www.chromatic.com/docs/playwright/)

## Building

```
Expand Down
4 changes: 0 additions & 4 deletions cypress.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions cypress/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions cypress/component/component-health-check.cy.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions cypress/e2e/health-check.cy.ts

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

160 changes: 0 additions & 160 deletions cypress/support/commands.ts

This file was deleted.

12 changes: 0 additions & 12 deletions cypress/support/component-index.html

This file was deleted.

40 changes: 0 additions & 40 deletions cypress/support/component.ts

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/e2e.ts

This file was deleted.

Loading

0 comments on commit b549bbd

Please sign in to comment.