Skip to content

test(app): restore timeline e2e server health mock#29336

Merged
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/app-e2e-global-health-mock
May 26, 2026
Merged

test(app): restore timeline e2e server health mock#29336
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/app-e2e-global-health-mock

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented May 26, 2026

Summary

  • make the shared Playwright mock server respond to the required global health endpoint
  • reuse that mock in the two timeline regression specs instead of maintaining duplicate route tables
  • allow the streamed timeline regression to provide its queued SSE events through the shared mock

Cause

After global server health moved into app startup state, these timeline tests still returned an empty object for /global/health. The app correctly treated the mocked server as unhealthy and stayed on the reconnect screen before reaching any timeline assertion.

Validation

  • bunx playwright test e2e/smoke/session-timeline.spec.ts e2e/regression/session-timeline-collapse-state.spec.ts e2e/regression/session-timeline-context-resize.spec.ts — 4 passed
  • bun typecheck in packages/app
  • push hook: bun turbo typecheck — 18 successful

Copilot AI review requested due to automatic review settings May 26, 2026 07:24
@Hona Hona requested a review from adamdotdevin as a code owner May 26, 2026 07:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restores e2e timeline regression specs by extending the shared Playwright mock server to satisfy the new /global/health startup probe and to support per-test SSE event injection, then refactors the two timeline regression specs to use the shared mock instead of duplicate route tables.

Changes:

  • Add /global/health response and optional events factory to the shared mock server, threading queued events through sse().
  • Replace inline route tables in two regression specs with mockOpenCodeServer calls.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/app/e2e/utils/mock-server.ts Adds healthy /global/health response and optional events factory for SSE payloads.
packages/app/e2e/regression/session-timeline-context-resize.spec.ts Removes duplicated route table and uses the shared mock helper.
packages/app/e2e/regression/session-timeline-collapse-state.spec.ts Removes duplicated route table and forwards queued events via the shared mock.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona enabled auto-merge (squash) May 26, 2026 07:26
@Hona Hona merged commit 1f66db0 into anomalyco:dev May 26, 2026
12 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.

2 participants