Skip to content

test(ui): SQL specs wait for ES searchability — un-reds the matrix ES legs - #750

Merged
smunini merged 4 commits into
mainfrom
fix/596-sql-specs-es-visibility
Aug 28, 2026
Merged

test(ui): SQL specs wait for ES searchability — un-reds the matrix ES legs#750
smunini merged 4 commits into
mainfrom
fix/596-sql-specs-es-visibility

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

Part of #596 — fixes the regression that has had all four Elasticsearch legs of ui-tests-matrix red since the Aug 26 nightly (runs 76 and 77 fail on exactly the same three specs on every ES leg, including s3-elasticsearch; the chronic items in #596's description did not even appear in run 77).

The regression

The three SQL on FHIR specs (new to the nightly with the #649 stack) seed their ViewDefinition/Library/Patient over REST and immediately drive pages that read through search: the rail listing, the depends-on resolution, and the $sql-run preview. On the ES composites the asynchronous index has not refreshed yet, so everything comes up empty and the specs time out. The simple-backend legs never see it — search there is read-your-write.

The fix

  • The three specs call waitSearchable (the established helper, built for precisely this) on their seeds before navigating. Simple backends pass through it instantly.
  • The ViewDefinition spec also scopes its view with a where on its own seeded family: the run preview cuts at 50 rows, so on any populated store the asserted row could legitimately fall off the page — this makes the assert deterministic everywhere (it is also what bit local runs, where boot.mjs's fixed-path db accumulates).

Also: heals the #743/#744 merge skew on main

Running the full suite against merged main surfaced two guard failures unrelated to the matrix: Start export still said btn--accent, which the button-scale unification (#744, merged just before #743) removed — migrated to the unified btn--primary; and #748's bulk-import-manifest-empty test hook had no rule — it gets a real one (tighter inset than the page-level empty state).

Verified

Full Playwright suite on merged main: 289 passing after these fixes (282 + the design guard that the skew broke); full helios-ui Rust ring zero failures; the three SQL specs green on a fresh server. The ES legs themselves need the next nightly (or a manual workflow_dispatch) to confirm — happy to trigger one once this merges.

Part of #596.

The three SQL on FHIR specs (new in the Aug 26 nightly) seed their
ViewDefinition/Library/Patient over REST and immediately drive pages
that read through search - on the four Elasticsearch composite legs the
asynchronous index has not refreshed yet, so the rail, the depends-on
resolution, and the run preview all come up empty and every ES leg of
ui-tests-matrix has been red since (runs 76 and 77 fail on exactly these
three specs on all four legs). waitSearchable is the established answer;
the simple-backend legs pass through it instantly.

The ViewDefinition spec also scopes its view to its own seeded patient:
the run preview cuts at 50 rows, so on any populated store the asserted
row could fall off the page.
Two classes landed on main without rules and fail the design guard:
Start export still said btn--accent, which the button-scale unification
(#744, merged just before #743) removed - it takes the unified
btn--primary like every migrated call site. And #748's
bulk-import-manifest-empty hook, referenced by its nojs and Rust tests,
gets a real rule: a tighter inset than the page-level empty state.
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

angela-helios and others added 2 commits August 28, 2026 01:16
The first heal gave #748's ruleless hook class its own padding, which
broke the very parity its spec enforces - the two empty states must
share one computed signature. A selector hook is not vocabulary: it
moves to data-empty=manifests, the class list returns to the bare shared
.empty-state, and the page object, nojs spec, and Rust assert follow.
Both sides independently replaced #748's ruleless
.bulk-import-manifest-empty marker class with a data attribute. Keeps
main's data-bulk-import-manifest-empty, which matches the page's
existing data-bulk-import-* hooks; the template, page object, nojs spec,
and Rust assert all follow it.

Claude-Session: https://claude.ai/code/session_0169dqJaApLYpi5vSzD5MEvk
@smunini
smunini merged commit b64503f into main Aug 28, 2026
3 of 4 checks passed
@smunini
smunini deleted the fix/596-sql-specs-es-visibility branch August 28, 2026 11: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.

2 participants