gui tests: routing-levels and rate-limited-sink wheel the group editor's row into sight before clicking it — the editor grew, so its Levels and Order rows sat at the 1400px window's foot; WebKit's own scroll into view left a 3px sliver above the footer and clicked the footer ("footer intercepts pointer events"). They wheel as the tests' Save already does (the page puts back a scroll the reader didn't make). The click-moves-nothing checks are unchanged. Pass in Chromium and WebKit, en and zh; failed in WebKit on 6e623d16.

This commit is contained in:
yetone committed 2026-10-06 05:56:47 +08:00
1 parent b8b7ee507a
commit aab2e4412a
2 files changed
+18 -1

No files matched your search

@@ -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();
+9 -1
View File
@@ -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"]);