Skip to content

test: expand e2e coverage — composer interactions, panels, settings, recovery - #12

Merged
danielglh merged 1 commit into
mainfrom
test/e2e-coverage
Aug 29, 2026
Merged

test: expand e2e coverage — composer interactions, panels, settings, recovery#12
danielglh merged 1 commit into
mainfrom
test/e2e-coverage

Conversation

@danielglh

Copy link
Copy Markdown
Owner

What

Fills the coverage gaps from the audit in #11 (composer interaction surface, side panels, settings, failure recovery, plus the session-list page in the viewport ladder). ~20 new assertions on top of the existing harness; no new infrastructure beyond a seed script.

New composer.spec.ts — the everyday surface:

  • slash-command picker (filter + insert), @file context picker (search cwd, insert relative path)
  • thinking-level switch round-trips through the agent (set_thinking_levelthinking_level_changed → chip re-renders)
  • model picker popover lists the agent's models
  • queued message steering mid-turn; esc abort returns the composer to idle

New panels.spec.ts:

  • files panel: tree + markdown preview modal
  • context panel: usage bar, session stats, export path link
  • agents panel: subagent snapshot listing
  • settings: roles editor dirty→save roundtrip (mock config PUT), catalog filter
  • theme toggle flips data-theme and persists across reload

flows.spec.ts additions: deny approval branch, stopped-session auto-restart on open, resume dialog (mock history) end-to-end, and a second browser context joining a live session (frame fan-out + live transcript).

layout.spec.ts: the per-viewport ladder now also covers the session-list page (header uniqueness + overflow), not just the session page.

Harness changes

  • e2e/scripts/prepare-env.mjs seeds a fixture project; the server's default cwd points at it (drives files panel and @-picker with deterministic content).
  • Mock host accepts OMP_WEB_MOCK_STEP_MS to lengthen the canned turn so tests can act mid-turn instead of racing the drain.

Stabilization notes (baked into the tests as comments)

  • The composer textbox must be located by role alone: its accessible name comes from the placeholder, which flips to "Queue a prompt…" mid-turn — a placeholder-based locator stops resolving exactly while streaming.
  • "streaming…" is the real mid-turn signal; the textarea is visible in every state.
  • Pending pills are told apart from flushed user bubbles by their container, in case the turn drains between queueing and asserting.

…recovery

New specs:
- composer.spec.ts: slash-command picker, @file context picker, thinking
  level roundtrip, model picker popover, queued-message steering, esc
  abort — the everyday interaction surface.
- panels.spec.ts: files tree + markdown preview, context usage/stats +
  export path, subagent snapshot listing, settings roles editor + catalog
  filter + save roundtrip, theme toggle persistence.
- flows: deny approval branch, stopped-session auto-restart on open,
  resume dialog (mock history) end-to-end, second browser joining a live
  session.
- layout ladder now also covers the session-list page per viewport.

Harness:
- prepare-env.mjs seeds a fixture project for the files/@-picker tests;
  the default cwd points at it.
- mock host accepts OMP_WEB_MOCK_STEP_MS to lengthen the canned turn so
  tests can act mid-turn instead of racing the drain.

Stabilization notes baked into the tests: the composer textbox must be
located by role alone (its accessible name comes from the placeholder,
which flips mid-turn), "streaming…" is the real mid-turn signal (the
textarea is visible in every state), and pending pills are distinguished
from flushed user bubbles by their container.
@danielglh
danielglh merged commit 63088c2 into main Aug 29, 2026
2 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