gui tests: gateway mode's hidden alerts are read through their Alerts list
7d177985f put the four alert rows under an Alerts heading and hides the
heading and its list as one in gateway mode, not each row. gateway-mode's
agentRows still read each row's own hidden, so it went red in both engines
in the full GUI run ([false,true,true,true,true]). A row now counts as shown
when neither it nor its list and heading are hidden. What the user sees was
right; only the test read the old layout.
Run on mote: gateway-mode.test.cjs 6 of 6.
Broken by hand: with the heading and list left out of the gateway-mode
hide, chromium en and webkit en go red on "agents' rows in gateway mode".
This commit is contained in:
@@ -90,9 +90,13 @@ const KEPT = ["sessions", "library", "providers", "routing", "groups", "gateway"
|
||||
// the tabs shown, the page shown
|
||||
const tabs = (page) => page.evaluate(() => [...document.querySelectorAll("#nav button[data-view]")].filter((b) => !b.hidden && b.offsetParent).map((b) => b.dataset.view));
|
||||
const viewShown = (page) => page.evaluate(() => [...document.querySelectorAll("main.view")].filter((v) => !v.hidden).map((v) => v.id));
|
||||
// the rows gateway mode leaves out of Settings, each shown or not
|
||||
// the rows gateway mode leaves out of Settings, each shown or not: the
|
||||
// alerts go with their Alerts list and heading, hidden as one
|
||||
const agentRows = (page) => page.evaluate(() => ["#plainNamesSegs", "#usageAlertSegs", "#balanceAlertSegs", "#resetReminderSegs", "#turnDoneSegs"]
|
||||
.map((s) => !document.querySelector(s).closest(".row").hidden));
|
||||
.map((s) => {
|
||||
const r = document.querySelector(s).closest(".row"), list = r.closest("#alertList");
|
||||
return !r.hidden && (!list || (!list.hidden && !document.querySelector("#alertHead").hidden));
|
||||
}));
|
||||
|
||||
async function noSelectNoBorder(page, where) {
|
||||
const bad = await page.evaluate(() => {
|
||||
|
||||
Reference in New Issue
Block a user