Skip to content

docs(screenshots): add step for specific component testing #29594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/core/testing/usage-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,19 @@ Instead, use the [Update Reference Screenshots GitHub Action](https://github.com

1. Click the **Run workflow** dropdown.
2. Select your branch.
3. Click **Run workflow**.
3. Leave the input field blank.
4. Click **Run workflow**.

This workflow will re-run the screenshot tests. Instead of failing any tests with mismatched screenshots, it will take new ground truth screenshots. These ground truth screenshots will be pushed as a single commit to your branch once the workflow is completed.
This workflow will re-run all of the the screenshot tests. Instead of failing any tests with mismatched screenshots, it will take new ground truth screenshots. These ground truth screenshots will be pushed as a single commit to your branch once the workflow is completed.

If you want to update ground truths for a specific test, you can pass the test file path as an input to the workflow. This is useful when working on a specific component.

1. Click the **Run workflow** dropdown.
2. Select your branch.
3. Enter the file path in the input field. Example: `src/components/alert/test/basic/`
4. Click **Run workflow**.

The input field also accepts component names, such as `alert`. You can enter multiple components by separating them with spaces, for example, `alert button`. For a full list of options, refer to Playwright's [Command Line page](https://playwright.dev/docs/test-cli).

### Verifying Screenshot Differences

Expand Down
Loading