Problem
The step('search input renders suggestions for a 1-char query', ...) block in test-home-coverage-e2e.js flakes intermittently in CI. The test waits for .home-suggest.open to appear, but home.js wraps the /api/nodes/search?q=... fetch in a try/catch — when the fetch fails or times out (cold CI, network blip), the .open class never gets added to .home-suggest and the test waits forever.
This has been "fixed" twice already with timing tweaks; the underlying issue is that the test exercises a real network path with no mock.
Workaround
PR #1310 skips the body of this single step (keeps pickedPubkey/pickedName populated via pickAnyPubkey(page) so later steps still work). All other home-coverage steps remain.
Proper fix
Mock /api/nodes/search at the Playwright level (page.route('**/api/nodes/search**', ...)) so the suggestion dropdown render is exercised against a deterministic response. That gives us coverage of the UI path without depending on the live API.
Bonus: consider whether home.js's try/catch should at least add .home-suggest.open with an empty/error state on fetch failure, so the dropdown isn't silently invisible to users when the API hiccups.
Refs
Problem
The
step('search input renders suggestions for a 1-char query', ...)block intest-home-coverage-e2e.jsflakes intermittently in CI. The test waits for.home-suggest.opento appear, buthome.jswraps the/api/nodes/search?q=...fetch in a try/catch — when the fetch fails or times out (cold CI, network blip), the.openclass never gets added to.home-suggestand the test waits forever.This has been "fixed" twice already with timing tweaks; the underlying issue is that the test exercises a real network path with no mock.
Workaround
PR #1310 skips the body of this single step (keeps
pickedPubkey/pickedNamepopulated viapickAnyPubkey(page)so later steps still work). All other home-coverage steps remain.Proper fix
Mock
/api/nodes/searchat the Playwright level (page.route('**/api/nodes/search**', ...)) so the suggestion dropdown render is exercised against a deterministic response. That gives us coverage of the UI path without depending on the live API.Bonus: consider whether
home.js's try/catch should at least add.home-suggest.openwith an empty/error state on fetch failure, so the dropdown isn't silently invisible to users when the API hiccups.Refs
test-home-coverage-e2e.js, around line 105home.js(search debounce + fetch path)