Files
magpie/internal
yetone 93b1b49047 gui tests: searcher-pick waits for the reloaded Settings to be drawn (#1745)
After the reload, the test took the first searcher row it found and
scrolled to it. Settings draws the row when the page opens and again
when load() has the state, so on a busy machine the row was replaced
under scrollIntoViewIfNeeded: "Element is not attached to the DOM"
(webkit zh alone on WSL at 01de489de, webkit en in a whole run).

Now the test waits for settingsDrawn, as it does on first open (#1659).
The fake server can hold the state and settings reads (st.slowRead, 400ms
here), so the page's first drawing and load()'s are apart every run, and
the test checks the row it scrolled to is the one that stays.

Run:
- Broken by hand (settingsDrawn after the reload removed), with the
  injected read delay, on WSL: 2 of 4 red with the reported error,
  "locator.scrollIntoViewIfNeeded: Element is not attached to the DOM"
  (chromium en, webkit zh).
- Fixed, on mote: node --test searcher-pick.test.cjs, both engines,
  22 pass, 0 fail.
- Fixed, on WSL: the picked-in-Settings cases in WebKit, 2 of 2 ok.

Not tried: the whole GUI suite (test-only change to one file).
2026-11-03 21:39:10 +08:00
..
…
…
…
…
…
…
…