• Will Chen's avatar
    Simplify Playwright summary to single re-run command (#2605) · 4aa7a011
    Will Chen 提交于
    ## Summary
    - Replace per-test `npm run e2e` commands in the Playwright PR comment
    with a single combined command listing all unique failing spec files
    - Remove unused `isSnapshotFailure` and `generateTestCommand` helper
    functions
    - Makes it easier to copy-paste and re-run all failures at once
    
    ## Test plan
    - Verify the generated PR comment format by inspecting the next CI run
    with test failures
    - The command section should show a single `npm run e2e` with
    backslash-joined spec file paths
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2605"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Simplified the Playwright PR comment to a single copy-paste command that
    re-runs all failing spec files at once. This reduces noise and speeds up
    local reproduction.
    
    - **Refactors**
    - Generate one command using backslash-joined unique failing spec paths;
    sanitize file paths.
    - Remove isSnapshotFailure and generateTestCommand; drop snapshot flags
    and error previews from the comment.
    
    <sup>Written for commit 9e24baa4782ab82cb93b7cbf3fa579063e269b51.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Low Risk**
    > Only changes CI comment output formatting/commands and removes unused
    helpers; no impact to test execution itself, but could slightly affect
    how developers re-run failures locally.
    > 
    > **Overview**
    > Simplifies the Playwright PR comment’s macOS re-run section to output
    a **single** `npm run e2e` command listing all *unique failing spec
    files*, instead of generating per-test `-g` commands.
    > 
    > Removes the snapshot-detection and per-test command helpers
    (`isSnapshotFailure`, `generateTestCommand`), dropping
    `--update-snapshots` suggestions and reducing comment noise.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    9e24baa4782ab82cb93b7cbf3fa579063e269b51. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    Co-authored-by: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    4aa7a011
generate-playwright-summary.js 15.0 KB