update-int-snapshots
Use when Playwright visual snapshots in e2e/visual.spec.ts-snapshots/ need to be regenerated after a UI change (logo, theme, layout, anything that affects rendered pixels) and the integration suite needs to be rerun via make int
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 14 444
- Лиценз
- MIT
- Последна проверка на записа
- 20.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add amir20/dozzleСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Update Integration Snapshots
When to Use
- A visual change landed (logo, color, spacing, fonts) and
make intwill fail onvisual.spec.tsuntil snapshots are regenerated. - A snapshot test reports diffs you've confirmed are intentional.
Do NOT use when diffs are unintentional regressions — investigate first.
Procedure
-
Delete the stale snapshots so Playwright writes fresh ones (don't try to update in place, the old PNGs can confuse the diff):
rm e2e/visual.spec.ts-snapshots/*.png -
Run with
--update-snapshotsviacompose up. You must usecompose up(notcompose run) because the navigation sidebar snapshot includes the live container list, and the two modes produce different sibling containers. The cleanest way is to patch the playwright command indocker-compose.ymltemporarily:sed -i.bak 's|command: npx --yes playwright test|command: npx --yes playwright test --update-snapshots|' docker-compose.yml make int mv docker-compose.yml.bak docker-compose.ymlSnapshots must be generated in Linux/Chromium (the compose image), not macOS, because filenames include the platform suffix (e.g.
-chromium-linux.png).Nothing needs clearing first. The compose file publishes no host ports, every container is named
dozzle_e2e_*under the fixed projectdozzle_e2e, and filters match those names exactly. Other containers on the machine can't block the run or show up in the snapshots, and a leftover run from another worktree is recreated. Two worktrees runningmake intat the same time do still clobber each other, so run one at a time. -
Verify by rerunning the normal suite:
make intShould now pass cleanly.
-
Commit the regenerated PNGs alongside the UI change so CI stays green.