Run only the browser in docker for storybook screenshots (#32489)

* Remove old screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add experimental playwright-screenshots.sh utility and use it for shared-components `test:storybook:update`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tidy up

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate based on review

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2026-02-13 10:20:16 +00:00
committed by GitHub
parent d7ca3dbd1d
commit b3b6574638
15 changed files with 203 additions and 26 deletions
@@ -1,19 +0,0 @@
#!/bin/bash
#
# Update storybook screenshots
#
# This script should be used as the entrypoint parameter of the `playwright-screenshots` script. It
# installs the pnpm dependencies, and then runs `vitest --run --update --project=storybook` to update the storybook screenshots.
#
# It requires that `playwright-screenshots` is given the `--with-node-modules` parameter.
set -e
# First install dependencies. We have to do this within the playwright container rather than the host,
# because we have which must be built for the right architecture (and some environments use a VM
# to run docker containers, meaning that things inside a container use a different architecture than
# those on the host).
pnpm install --frozen-lockfile
# Now run the screenshot update, we set CI=1 to inform vis to update the real baselines
CI=1 pnpm --dir packages/shared-components test:storybook --run --update