-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: setup workflow for updating Playwright screenshots (#16)
The new workflow has to be triggered manually. It will then update all screenshots and create a PR targeting the selected branch. Successfull test workflow run can be found [here](https://github.com/SchwarzIT/onyx/actions/runs/7394540946/job/20116073512).
- Loading branch information
1 parent
f8d101f
commit b7ae9c9
Showing
9 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update Playwright screenshots | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
name: Update Playwright screenshots | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .node-version | ||
cache: pnpm | ||
|
||
- name: 📦 Install dependencies | ||
run: pnpm install | ||
|
||
# install system dependencies for Playwright | ||
# see: https://playwright.dev/python/docs/browsers#install-system-dependencies | ||
- name: 📦 Install Playwright system dependencies | ||
run: pnpm exec playwright install-deps | ||
working-directory: packages/sit-onyx | ||
|
||
- name: 🗑️ Delete existing screenshots | ||
run: rm -rf ./playwright/snapshots | ||
working-directory: packages/sit-onyx | ||
|
||
- name: 🔎 Update Playwright screenshots | ||
run: pnpm run test:components --update-snapshots | ||
working-directory: packages/sit-onyx | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: "chore: update Playwright screenshots" | ||
title: "chore: update Playwright screenshots" | ||
body: This is an auto-generated pull request. All Playwright screenshots have been updated. | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Prettier ignores all files inside .gitignore by default so this file only contains | ||
# files that are checked into git but should not be formatted | ||
pnpm-lock.yaml | ||
pnpm-lock.yaml | ||
CODEOWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
* @JoCa96 @BoppLi @larsrickert | ||
# Global code owners (developers) | ||
* @JoCa96 @BoppLi @larsrickert | ||
|
||
# Define designers as code owners for screenshots to automatically | ||
# request them as reviewer if visual changes exist | ||
/packages/sit-onyx/playwright/snapshots/ @jannick-ux @martihofmann |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+3.22 KB
packages/sit-onyx/playwright/snapshots/TestInput/default-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.14 KB
packages/sit-onyx/playwright/snapshots/TestInput/default-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.14 KB
packages/sit-onyx/playwright/snapshots/TestInput/default-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters