Skip to content

Fix the flaky demo e2e step that turned main red - #29

Merged
Randolin merged 1 commit into
mainfrom
claude/product-strategy-positioning-u1vwig
Aug 29, 2026
Merged

Randolin merged 1 commit into
mainfrom
claude/product-strategy-positioning-u1vwig

Conversation

@Randolin

Copy link
Copy Markdown
Owner

main went red on the merge of #28. This fixes it. The app is fine; the test was wrong.

What happened

E2E FAIL: [demo-unconfigured] demo is missing "Overall alignment" with no server

…and the page dump printed directly beneath that failure contains the missing text:

Overall alignment
63%
from 22 shared answers

The assertion was right about what it wanted and wrong about when to look.

Why

The step waited for the creature names (brave-azure-otter), which render as soon as the demo model resolves, and then snapshotted document.body. But every compare panel is a lazily loaded componentprovideComparePanel resolves them asynchronously — so they arrive after the names. The snapshot caught a page still filling in.

It's been a race since the demo step was written in Wave 2, and it only lost on a slower runner: three CI runs and every local run happened to win it.

The fix

Wait for the panels the step actually asserts on before reading the body. Same lesson as the networkidle fix one commit earlier — wait for the thing you're asserting, not for a proxy that usually arrives first.

Verification

format:check and e2e green locally against a fresh production build. Nothing but e2e/run-e2e.mjs changes, so no app behaviour is touched.


Generated by Claude Code

main went red on the merge of #28: the demo step reported "demo is
missing 'Overall alignment'" while the page dump printed directly
beneath it contained "Overall alignment · 63% · from 22 shared answers".
The assertion was right about what it wanted and wrong about when to
look.

The step waited for the creature names, which render as soon as the
model resolves, and then snapshotted document.body. Every compare panel
is a lazily loaded component that arrives after that, so the snapshot
caught a page still filling in. It has been a race since the demo step
was written and only lost it on a slower runner — three CI runs and
every local run happened to win.

It now waits for the panels it actually asserts on before reading the
body. Same lesson as the networkidle fix a commit ago: wait for the
thing you are asserting, not for a proxy that usually arrives first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UaDanzXTm6kVSgbNh1eNrs
@Randolin
Randolin merged commit 575a19d into main Aug 29, 2026
2 checks passed
@Randolin
Randolin deleted the claude/product-strategy-positioning-u1vwig branch August 29, 2026 00:43
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