dyad:e2e-rebase
E2E Snapshot Rebase
Rebase E2E test snapshots based on failed tests from the PR comments.
Instructions
-
Get the current PR number using
gh pr view --json number --jq '.number' -
Fetch PR comments and look for the Playwright test results comment. Parse out the failed test filenames from either:
- The "Failed Tests" section (lines starting with
- \filename.spec.ts`) - The "Update Snapshot Commands" section (contains
npm run e2e e2e-tests/filename.spec.ts)
- The "Failed Tests" section (lines starting with
-
If no failed tests are found in the PR comments, inform the user and stop.
-
Build the application binary:
npm run buildIMPORTANT: E2E tests run against the built binary. If any application code (anything outside of
e2e-tests/) has changed, you MUST run this build step before running E2E tests, otherwise you'll be testing the old version. -
For each failed test file, run the e2e test with snapshot update:
PLAYWRIGHT_HTML_OPEN=never npm run e2e e2e-tests/<testFilename>.spec.ts -- --update-snapshots -
After updating snapshots, re-run the same tests WITHOUT
--update-snapshotsto verify they pass consistently:PLAYWRIGHT_HTML_OPEN=never npm run e2e e2e-tests/<testFilename>.spec.tsIf any test fails on this verification run, inform the user that the snapshots may be flaky and stop.
-
Show the user which snapshots were updated using
git diffon the snapshot files. -
Review the snapshot changes to ensure they look reasonable and are consistent with the PR's purpose. Consider:
- Do the changes align with what the PR is trying to accomplish?
- Are there any unexpected or suspicious changes?
-
If the snapshots look reasonable, commit and push the changes:
git add e2e-tests/snapshots/ git commit -m "Update E2E snapshots" git push -
Inform the user that the snapshots have been updated and pushed to the PR.
More from dyad-sh/dyad
dyad:multi-pr-review
Multi-agent code review system that spawns three independent Claude sub-agents to review PR diffs. Each agent receives files in different randomized order to reduce ordering bias. One agent focuses specifically on code health and maintainability. Issues are validated using reasoned analysis rather than simple vote counting. Reports merge verdict (YES / NOT SURE / NO). Automatically deduplicates against existing PR comments. Always posts a summary (even if no new issues), with low priority issues in a collapsible section.
30remember-learnings
Review the current session for errors, issues, snags, and hard-won knowledge, then update the rules/ files (or AGENTS.md if no suitable rule file exists) with actionable learnings.
30dyad:plan-to-issue
Create a plan collaboratively with the user, then convert the approved plan into a GitHub issue.
26dyad:feedback-to-issues
Turn customer feedback (usually an email) into discrete GitHub issues. Checks for duplicates, proposes new issues for approval, creates them, and drafts a reply email.
25dyad:deflake-e2e-recent-commits
Automatically gather flaky E2E tests from recent CI runs on the main branch and from recent PRs by wwwillchen/keppo-bot/dyad-assistant, then deflake them.
25dyad:pr-push
Commit any uncommitted changes, run lint checks, fix any issues, and push the current branch.
25