feat: VRTをPlaywright toHaveScreenshot()で実装 (#36)#42
Open
topi-log wants to merge 6 commits into
Open
Conversation
- e2e/vrt.spec.tsを新規追加(ホーム・プライバシーポリシー・利用規約・記録一覧・エディタ) - ベースラインスナップショット6枚をコミット - playwright.config.tsにno-sandbox・animations無効・maxDiffPixelRatio 2%を設定 - package.jsonにtest:vrt・test:vrt:updateスクリプトを追加 - record.spec.tsからCookie認証移行後に不要になったsetAuthStorage(localStorage)を削除 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- playwright.config.ts: `next start`(port 8001)に変更しStrictModeによるflakiness解消 - mobile(Pixel 5)プロジェクトを追加 - APIルートをglobパターン(`**/api/v1/...`)に統一 - モックデータをAPIレスポンス形式(nameフィールド)に修正 - waitForLoadStateをexplicitなlocator waitに置き換え - home.spec.ts: モバイルでログインボタンがメニュー内のためskip追加 - スナップショット(chromium/mobile)を更新・追加 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
うーん、また考える |
- `test:e2e` スクリプトを vrt.spec.ts を除外するよう変更 - CI に独立した `vrt` ジョブを追加(失敗時は差分をアーティファクトとしてアップロード) - `update-vrt.yml` を追加: CI 環境(Ubuntu)でスナップショットを更新し、ブランチにコミットバックする `workflow_dispatch` ワークフロー Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
プッシュ時に --update-snapshots でスナップショットを生成し、差分があれば [skip ci] コミットとしてブランチに自動プッシュ。 ローカル環境とCI環境のフォントレンダリング差異を解消する。 update-vrt.yml ワークフローは不要になったため削除。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pull_request イベントへの permissions: contents: write 付与はワークフロー 全体がスキップされる原因となるため削除。 代わりに push トリガー専用の vrt-update.yml を追加し、push イベントの 書き込み権限でスナップショットをコミットバックする方式に分離。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e2e/vrt.spec.tsを新規追加。Playwright のtoHaveScreenshot()でスクリーンショット比較テストを実装playwright.config.tsに--no-sandbox(Docker対応)・animations: 'disabled'・maxDiffPixelRatio: 0.02を設定package.jsonにtest:vrt(比較実行)とtest:vrt:update(ベースライン更新)スクリプトを追加record.spec.tsからCookie認証移行後に不要になったsetAuthStorage(localStorage)を削除Test plan
yarn test:vrtで全6件パスすることyarn test:vrtを実行するとテストが失敗することyarn test:vrt:updateでスナップショットを更新後に再度パスすること🤖 Generated with Claude Code