doc: update SC visual test doc (#31897)

This commit is contained in:
Florian Duros
2026-01-27 14:31:14 +01:00
committed by GitHub
parent d5c49e6a2e
commit a972340216
2 changed files with 6 additions and 31 deletions

View File

@@ -98,30 +98,7 @@ For more information about visual testing, see [Visual Testing](playwright#visua
### Shared Components Tests
The shared-components package uses Playwright (via Storybook test runner) to validate component rendering across different states and configurations.
**Run Storybook tests:**
```sh
cd packages/shared-components
yarn test:storybook
```
**Run Storybook tests in CI mode:**
```sh
cd packages/shared-components
yarn test:storybook:ci
```
**Update Storybook screenshots:**
```sh
cd packages/shared-components
yarn test:storybook:update
```
This uses the same Docker-based screenshot rendering as Element Web to ensure consistency across platforms.
See the [Shared Components README](../packages/shared-components/README.md#visual-regression-tests) for instructions on running the shared components Playwright tests.
### Projects
@@ -148,13 +125,6 @@ Misc:
- `playwright/pages/` - Page object models
- `playwright/plugins/` - Custom Playwright plugins
**Shared components tests** are located in `packages/shared-components/`:
- `packages/shared-components/playwright/snapshots/` - Storybook screenshot baselines
- `packages/shared-components/.storybook/` - Storybook configuration
The shared components use Storybook's test runner (powered by Playwright) to validate component rendering across different states and configurations.
### Homeserver Setup
Homeservers (Synapse or Dendrite) are launched by Playwright workers and reused for all tests matching the worker configuration.

View File

@@ -281,6 +281,11 @@ Each story will be rendered and a screenshot will be taken and compared to the
existing baseline. If there are visual changes or AXE violation, the test will
fail.
Screenshots are located in `packages/shared-components/__vis__/`.
> [!IMPORTANT]
> In case of docker issues with Playwright, see [playwright EW documentation](https://github.com/element-hq/element-web/blob/develop/docs/playwright.md#supported-container-runtimes).
### Translations
First see our [translation guide](../../docs/translation.md) and [translation dev guide](../../docs/translation-dev.md).