Skip to content

test(e2e): assert the fixture's preconditions, and say where connect stopped - #498

Open
sotashimozono wants to merge 1 commit into
test/e2e-connect-budgetfrom
test/e2e-fixture-preconditions
Open

test(e2e): assert the fixture's preconditions, and say where connect stopped#498
sotashimozono wants to merge 1 commit into
test/e2e-connect-budgetfrom
test/e2e-fixture-preconditions

Conversation

@sotashimozono

Copy link
Copy Markdown
Owner

Stacked on #495.

The problem this fixes is diagnostic, not behavioural

Three different faults have been producing one message:

no shadow vault entry appeared in obsidian.json — connect command likely never fired

That collapse cost three rounds of fixing the wrong thing. The text stayed identical while its cause changed underneath: the palette was not interactive (#492), then the command might not have been registered (#493), then ConnectModal's second pane was never clicked (#495). Each fix was right; none of them could be known to be right from the message.

What now names itself

The scaffold asserts what connect depends on and throws as a fixture fault, not a product failure:

  • the test private key exists — without it, auth cannot succeed;
  • for the default rpc transport, a daemon binary was actually staged — without it there is nothing to connect to.

Either now reads fixture missing: … with the path and the fix, instead of surfacing as "connect is broken" in fifteen specs.

connectAndWaitForShadowVault attaches the evidence that separates the remaining two causes:

  plugin log (tail): <last 12 lines — how far connect actually got>
  visible modal buttons: <labels — whether the click landed>

Both are best-effort: a diagnostic that throws would replace the error it exists to explain.

Why this instead of another guess

The last E2E run still fails connect nearly everywhere, and I have now twice mistaken this message for a cause I could name. The honest next step is to make the run answer the question rather than to patch a fourth hypothesis into it.

Verification

tsc --noEmit green locally. No unit-test surface. No auto-merge.

Refs #429

🤖 Generated with Claude Code

…stopped

Three different faults have been producing one message — "no shadow
vault entry appeared, connect command likely never fired" — and that
collapse cost three rounds of fixing the wrong thing. The message stayed
identical while its cause changed underneath: palette not interactive,
then the command possibly unregistered, then a ConnectModal whose second
pane was never clicked.

Two changes so the next red names itself.

The scaffold now asserts what connect DEPENDS ON, and throws as what
they are — fixture faults, not product failures:
  - the test private key exists (without it, auth cannot succeed);
  - for the default `rpc` transport, a daemon binary was actually staged
    (without it, there is nothing to connect to).

And `connectAndWaitForShadowVault` attaches the evidence that separates
the remaining two: the tail of the plugin's own log (how far connect
got) and the labels of the visible modal buttons (whether the click
landed). Both are best-effort, since a diagnostic that throws would
replace the error it was meant to explain.

Refs #429

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
plugin 80.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant