• dyad-assistant[bot]'s avatar
    fix: deflake E2E tests (select_component.spec.ts) (#3107) · de8ab4db
    dyad-assistant[bot] 提交于
    ## Summary
    - Fixed flaky `select_component.spec.ts > select component next.js` test
    by increasing the chat completion timeout for Next.js builds
    - Added configurable `timeout` parameter to `sendPrompt()` and
    `waitForChatCompletion()` in the test page objects
    - The test was timing out because Next.js apps take longer to build on
    the first prompt, exceeding the default MEDIUM timeout (15s local / 30s
    CI)
    
    ## Flaky test analysis
    Scanned 6 recent PRs by wwwillchen/wwwillchen-bot for flaky tests. Found
    30+ unique flaky test occurrences across these specs:
    - `setup_flow.spec.ts` (6 occurrences) - passed 10x runs, already stable
    - `select_component.spec.ts` (6 occurrences) - **confirmed flaky,
    fixed**
    - `setup.spec.ts` (5 occurrences) - passed 10x runs, already stable
    - `context_manage.spec.ts` (5 occurrences) - passed 10x runs, already
    stable
    - `undo.spec.ts` (3 occurrences) - passed 10x runs, already stable
    - `debugging_logs.spec.ts` (3 occurrences) - passed 10x runs, already
    stable
    
    ## Test plan
    - [x] Confirmed flakiness: `select_component.spec.ts` failed 1/10 runs
    before fix
    - [x] Verified fix: all 60 tests passed (6 tests × 10 runs) after the
    fix
    - [x] Verified other flaky specs are currently stable (all passed 10x
    repeat runs)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3107"
    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 -->
    Co-authored-by: 's avatarclaude[bot] <41898282+claude[bot]@users.noreply.github.com>
    Co-authored-by: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    de8ab4db
ChatActions.ts 3.5 KB