dyad:e2e-rebase

Updates Playwright E2E test snapshots based on failed tests reported in PR comments.

21.4k|2.6k|Updated Apr 11, 2025
One-click install
npx skills add https://github.com/dyad-sh/dyad --skill dyad-e2e-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dyad:e2e-rebase
Source: https://github.com/dyad-sh/dyad/tree/main/.claude/skills/e2e-rebase
Command: npx skills add https://github.com/dyad-sh/dyad --skill dyad-e2e-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

End-to-end snapshot tests fail on pull requests when UI output changes, and manually identifying, updating, and verifying each failed snapshot is repetitive and error-prone. This Skill automates the full rebase workflow from PR comment parsing to committing updated snapshots.

Core Features & Use Cases

  • PR Comment Parsing: Uses the GitHub CLI to fetch the current PR and extract failed Playwright test filenames from the test results comment.
  • Snapshot Regeneration: Rebuilds the application binary, then re-runs each failed spec with --update-snapshots and verifies stability with a follow-up run without the flag.
  • Review and Commit: Shows snapshot diffs via git diff, checks they align with the PR's purpose, then commits and pushes the updated snapshots.
  • Use Case: A PR changing the app's UI causes three Playwright snapshot tests to fail in CI. Run this Skill to parse the failures, regenerate the snapshots, verify they pass consistently, and push the updates back to the PR.

Quick Start

Rebase the failing E2E snapshots for the current pull request and push the updated snapshots.

Frequently Asked Questions about dyad:e2e-rebase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update Playwright snapshots for a failing PR?

Run the failed spec files with the --update-snapshots flag, then re-run them without the flag to confirm they pass consistently. This Skill automates that flow by parsing failed tests from the PR comments and committing the updated snapshots.

How to find failed E2E tests from GitHub PR comments?

Use the GitHub CLI with gh pr view to get the PR number, then fetch the PR comments and parse the Playwright results comment. Failed tests appear in the Failed Tests section or in the Update Snapshot Commands section.

Why do E2E snapshot tests fail after code changes?

Snapshot tests compare rendered output against stored baselines, so any UI or output change causes a mismatch. The application binary must be rebuilt before re-running tests, otherwise the tests run against the old version.

What if a snapshot test still fails after updating snapshots?

A failure on the verification run without --update-snapshots indicates the test may be flaky rather than outdated. The Skill stops and reports the flakiness instead of committing unstable snapshots.

Does this workflow require the GitHub CLI?

Yes, it relies on the gh CLI to retrieve the current PR number and fetch PR comments containing the Playwright test results. It also requires npm for building the app and running the E2E tests.