Skip to content

Add e2e tests for run-detail depth#27

Merged
alchaplinsky merged 2 commits into
mainfrom
e2e-run-detail-depth
May 20, 2026
Merged

Add e2e tests for run-detail depth#27
alchaplinsky merged 2 commits into
mainfrom
e2e-run-detail-depth

Conversation

@alchaplinsky

Copy link
Copy Markdown
Member

Summary

  • Adds tests/e2e/specs/runs/detail.spec.ts covering the gaps left by runs/view.spec.ts.
  • New tests (5):
    • Failed sidebar filter shows only failed runs
    • Failed scenario run renders the "Run failed" banner with the parsed error_json.message
    • Multi-step scenario trace renders Prompt Assembled → Model Requested Tool Call → Tool Call → Tool Response → Final Model Response in order
    • Expanding a model step reveals the USAGE row (Prompt / Completion / Total)
    • Expand all / Collapse all in the metrics bar toggle every step body

Test plan

  • bun run test:e2e -- --spec ./tests/e2e/specs/runs/detail.spec.ts → 5 passing, ran 3× consecutively to confirm stability

🤖 Generated with Claude Code

Covers the gaps left by runs/view.spec.ts: the Failed sidebar filter,
the parsed-error banner on a failed scenario run, a multi-step trace
with interleaved tool_call/tool_response, the USAGE token breakdown
in an expanded model step, and Expand-all/Collapse-all controls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown

Greptile Summary

Adds tests/e2e/specs/runs/detail.spec.ts with five new end-to-end tests covering run-detail behaviour that was previously untested: failed-run filtering, the error banner, multi-step tool-call trace ordering, token usage display, and the Expand all / Collapse all control.

  • Seeds three scenario executions (multi-step with tool calls, failing with error_json, and a simple succeeded run) in beforeEach; relies on the existing global afterTest hook for database cleanup between tests.
  • Tool-step selectors use the / arrow characters that are unique to Tool Call and Tool Response labels, avoiding the ambiguity flag raised in the earlier review thread.
  • The "Expand all / Collapse all" assertion counts all <pre> elements page-wide and expects exactly 5; this is slightly fragile if the page chrome ever gains additional <pre> nodes, but matches the pattern already established in view.spec.ts.

Confidence Score: 5/5

Additive test-only change with no production code modifications; safe to merge.

The change is purely additive (one new spec file, no production code touched). The selector ambiguity flagged in the earlier review thread has been addressed. Database isolation between tests is handled by the existing global afterTest hook. No defects were found in the test logic.

No files require special attention.

Reviews (2): Last reviewed commit: "Tighten tool_call selectors to use the a..." | Re-trigger Greptile

Comment thread tests/e2e/specs/runs/detail.spec.ts Outdated
span*=Tool Call matched "Model Requested Tool Call" first, so the
intended tool_call step label was never actually asserted. The arrow
(→ / ←) is unique to the tool_call and tool_response step labels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alchaplinsky
alchaplinsky merged commit e77a97a into main May 20, 2026
2 checks passed
@alchaplinsky
alchaplinsky deleted the e2e-run-detail-depth branch May 20, 2026 14:53
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