Skip to content

test(e2e): fix failures and improve stability - #23480

Merged
AmethystLiang merged 1 commit into
mainfrom
auto-e2e-tests-autofix-scheduled-ci-1h-run-81-20260927T0200
Sep 27, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
auto-e2e-tests-autofix-scheduled-ci-1h-run-81-20260927T0200

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​48 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34
Prod 0 0 0 0

Problem

E2E tests were failing or flaking due to environment-specific issues, incorrect element selectors, inadequate timeouts, and assumptions about filter behavior.

Solution

Fixed test reliability across 6 test files:

  • Address bar test: Adjust window sizing logic to prevent minimum size from masking narrow-pane state; tighten toolbar width measurement bounds (target 260px ±5px instead of >420px)
  • Daemon fixture: Add node_modules symlink so ESM imports resolve correctly in bundled fixture
  • Chat history test: Explicitly exercise manual paging fallback when IntersectionObserver is unavailable
  • Message rail test: Fix button selector from .first() to [data-current="true"] to target correct focused element
  • Terminal parking test: Update timing calculation for sustained-churn detection (uses 1/5 window instead of 4× burst window); increase test timeout from 180s to 420s
  • Worktree reveal test: Change semantics from "clear filters" to "adjust filters" to preserve selected repos while revealing; add repo ID lookup to validate filter behavior

Testing

Test-only changes; run: pnpm test tests/e2e/

- Narrow toolbar width and set window minimums for consistent testing
- Add node_modules symlink to fixture for ESM import resolution
- Exercise manual paging and fix button selector
- Preserve repo filters in reveal workflow
- Adjust timing strategy and increase test timeout
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2442f8f1-4d5b-40a0-9836-c0618ed8bcf8

📥 Commits

Reviewing files that changed from the base of the PR and between 0547b32 and fa3cac4.

📒 Files selected for processing (6)
  • tests/e2e/browser-address-bar-narrow-toolbar.spec.ts
  • tests/e2e/helpers/daemon-generation-runtime-fixture.ts
  • tests/e2e/native-chat-history-prepend-anchor.spec.ts
  • tests/e2e/native-chat-message-rail.spec.ts
  • tests/e2e/terminal-hidden-view-parking.spec.ts
  • tests/e2e/worktree-scroll-to-current.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates five E2E tests and one runtime fixture. The tests check narrow browser toolbar sizing, native-chat paging and focus, terminal parking-cycle timing, and sidebar filters when revealing a hidden workspace. The fixture creates a platform-specific node_modules symlink.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to fa3ca

The E2E test and fixture changes are ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, affected tests, and recommended test command. However, it does not follow the repository template because it omits the required ELI5, What Changed, Why,… Add the missing template sections. Include a linked issue or explain the applicable maintainer exception, set Visual Proof to N/A with a reason because this is test-only, document cross-platform and compatibility considerations, and complet…
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies E2E test fixes and stability improvements, which matches the main changes in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, solution, affected tests, and recommended test command. However, it does not follow the repository template because it omits the required ELI5, What Changed, Why, Linked Issue, Visual Proof, review, boundary, notes, and checklist sections.

Resolution

Add the missing template sections. Include a linked issue or explain the applicable maintainer exception, set Visual Proof to N/A with a reason because this is test-only, document cross-platform and compatibility considerations, and complete the required checklist items.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Test-only stability pass across six E2E files (no production code changed).

  • Address-bar narrow-toolbar spec — retargets the settled toolbar band from >420px to 260px ±5px and zeroes the window minimum inside setWindowWidth so the minimum can't mask the narrow-pane state. The added upper bound is what actually pins the inline field as collapsed.
  • Daemon-generation runtime fixture — symlinks the repo node_modules into the temp fixture root so external requires in the esbuild bundle resolve from the bundle's own directory. Verified the later recursive rmSync unlinks the Windows junction rather than traversing into the real node_modules.
  • Native-chat history-prepend spec — stubs window.IntersectionObserver to undefined before the chat view mounts, forcing the manual paging fallback (canObserve = false), which is exactly the path the test then drives.
  • Native-chat message-rail spec — replaces the loose .first()-button focus assertion with button[data-current="true"], matching the production focus target.
  • Terminal hidden-view parking spec — swaps the inter-cycle wait from the 4s burst window to ceil(FLIP_WINDOW/5) (12s) to stay below the 12-flip/60s sustained-churn pin, and raises the timeout to 420s.
  • Worktree reveal spec — renames to "adjusts filters" and asserts the reveal preserves the selected repo while appending the target repo, matching revealWorkspaceFilters' append semantics and the production dialog label.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@AmethystLiang
AmethystLiang merged commit 2984764 into main Sep 27, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant