Skip to content

Make the e2e assertions capable of failing - #199

Merged
fstubner merged 1 commit into
mainfrom
fix/e2e-assertions
Aug 18, 2026
Merged

fstubner merged 1 commit into
mainfrom
fix/e2e-assertions

Conversation

@fstubner

Copy link
Copy Markdown
Owner

See the commit message for the full reasoning — it is the detailed record for this change.

Four scenarios could not fail, which is worse than not having them: they
report green regardless, so the suite's coverage looks larger than it is.

Counts that matched zero:

  discover     /\d+ hosts?/         matched "0 hosts"
  sweep        /\d+ hosts? .* \d+ with open ports?/
  interfaces   /\d+ interfaces?/

All three now require [1-9]\d*. Each targets something guaranteed present:
discover and sweep run against 127.0.0.0/30, which contains the loopback
address the probe server listens on, and every machine has at least a
loopback interface. A total backend regression in any of them used to go
green.

ARP deliberately still tolerates zero, and now says why: an empty neighbour
cache is legitimate on a freshly booted runner, so requiring >= 1 would be
flaky rather than strict. A hard failure is still caught, because the status
bar would show an error rather than a count.

The pcap scenario returned false and passed when the Packet Capture menu
item was missing, so the whole capture surface disappearing was
indistinguishable from a healthy skip. Now that builds without the feature
keep the tool visible and show setup guidance (#193), an absent entry means
something broke -- so it is a hard assertion. The unavailable branch also
asserts the guidance names the feature and says how to get a capture-capable
build, rather than only checking the element exists.

Two silent skips:

- `closeSettingsDialog` returned quietly when `.settings-close` was absent,
  so a dialog that could no longer be dismissed left the suite green and
  every later step ran against a still-open modal. Now an assertion.
- `assertInterfaceReadinessReflectsSelection` early-returns on a host with
  no down interface. That is a real skip, but it now logs SKIP with the
  reason instead of reading like a pass.

Verified by `node --check` and by reading. NOT executed: the render harness
cannot pass on this host (WebView2 ignores the remote-debugging port on an
elevated session, wry#1782), and gui-render.yml is schedule-only for the
same reason. These changes are therefore unexercised until that is resolved
-- which is worth stating plainly, since the whole point of the change is
not trusting assertions that were never really running.
@fstubner
fstubner merged commit ae2620c into main Aug 18, 2026
15 checks passed
@fstubner
fstubner deleted the fix/e2e-assertions branch August 18, 2026 09:56
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