diff --git a/internal/gui/tests/rate-limited-sink.test.cjs b/internal/gui/tests/rate-limited-sink.test.cjs index 8b6b2417..64f219c8 100644 --- a/internal/gui/tests/rate-limited-sink.test.cjs +++ b/internal/gui/tests/rate-limited-sink.test.cjs @@ -160,6 +160,15 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", const field = label.locator("xpath=following-sibling::div[1]"); await label.waitFor(); assert.match(await field.locator(".opt", { hasText: new RegExp(`^${w.back}$`) }).getAttribute("class"), /\bon\b/); + // the editor runs under the window's foot: wheeled to, as the reader + // would (WebKit's own scroll left a sliver of In turn over the footer + // and clicked the footer) + const turn = ed.locator(".segs .opt", { hasText: new RegExp(`^${w.turn}$`) }).first(); + await page.mouse.move(550, 600); + for (let i = 0; i < 10 && (await turn.boundingBox()).y > 1400 - 260; i++) { + await page.mouse.wheel(0, 300); + await page.waitForTimeout(150); + } await ed.locator(".segs .opt", { hasText: new RegExp(`^${w.turn}$`) }).first().click(); assert.equal(await label.isVisible(), false, "in turn: nothing to pick"); await ed.locator(".segs .opt", { hasText: new RegExp(`^${w.order}$`) }).first().click(); diff --git a/internal/gui/tests/routing-levels.test.cjs b/internal/gui/tests/routing-levels.test.cjs index 01b1d4b0..1509faf8 100644 --- a/internal/gui/tests/routing-levels.test.cjs +++ b/internal/gui/tests/routing-levels.test.cjs @@ -96,7 +96,15 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", assert.equal(await row().locator(".hint").textContent(), w.sharedHint); assert.equal(await row().locator(".rt-levels").isHidden(), true); - // named: one toggle per level, the shared ones on + // named: one toggle per level, the shared ones on (the row, under the + // window's foot as the editor grew, wheeled to as the reader would: + // WebKit's own scroll left a sliver of it over the footer and clicked + // the footer) + await page.mouse.move(550, 600); + for (let i = 0; i < 10 && (await row().boundingBox()).y > 1400 - 260; i++) { + await page.mouse.wheel(0, 300); + await page.waitForTimeout(150); + } await row().locator(".segs .opt", { hasText: w.named }).click(); assert.equal(await row().locator(".hint").textContent(), w.namedHint); assert.deepEqual(await chips().allTextContents(), ["none", "minimal", "low", "medium", "high", "xhigh", "max"]);