test: exercise floor state in browser smoke
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
This commit is contained in:
@@ -60,19 +60,19 @@ async function inspect(viewport, name) {
|
||||
checks.push({ name: `${name}:idle-render`, status: after === before ? "PASS" : "FAIL", detail: `${before}->${after}` });
|
||||
if (name === "desktop") {
|
||||
const buttons = page.locator("#floor-controls button");
|
||||
const labels = await buttons.allTextContents();
|
||||
const unicodeIndex = labels.findIndex((label) => /[^\x00-\x7F]/.test(label));
|
||||
if (unicodeIndex >= 0) {
|
||||
const button = buttons.nth(unicodeIndex);
|
||||
const buttonCount = await buttons.count();
|
||||
if (buttonCount > 0) {
|
||||
const button = buttons.nth(0);
|
||||
const label = (await button.innerText()).trim();
|
||||
await button.click();
|
||||
await page.waitForTimeout(150);
|
||||
const hashWritten = await page.evaluate(() => window.location.hash.length > 1);
|
||||
await button.click();
|
||||
await page.waitForTimeout(150);
|
||||
checks.push({
|
||||
name: "desktop:unicode-floor-state",
|
||||
name: "desktop:floor-state",
|
||||
status: hashWritten ? "PASS" : "FAIL",
|
||||
detail: hashWritten ? "UTF-8 floor label serialized to URL hash" : "URL hash was not written",
|
||||
detail: hashWritten ? `Floor label serialized to URL hash: ${label}` : `URL hash was not written: ${label}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user