test: target generated floor labels in 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:
@@ -43,7 +43,7 @@ async function inspect(viewport, name) {
|
||||
// The loading overlay starts hidden, then becomes visible while metadata and
|
||||
// the first GLB load. Waiting for "hidden" alone can pass before loading has
|
||||
// even started. A rendered floor control is the first stable readiness fact.
|
||||
await page.waitForSelector("#floor-controls button", { state: "visible", timeout: 60000 });
|
||||
await page.waitForSelector("#floor-controls label", { state: "visible", timeout: 60000 });
|
||||
await page.waitForSelector("#loading", { state: "hidden", timeout: 60000 });
|
||||
const actualViewport = await page.evaluate(() => ({ width: window.innerWidth, height: window.innerHeight }));
|
||||
const viewportMatches = actualViewport.width === viewport.width && actualViewport.height === viewport.height;
|
||||
@@ -63,15 +63,15 @@ async function inspect(viewport, name) {
|
||||
const after = await page.evaluate(() => window.__renders || 0);
|
||||
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 buttonCount = await buttons.count();
|
||||
if (buttonCount > 0) {
|
||||
const button = buttons.nth(0);
|
||||
const label = (await button.innerText()).trim();
|
||||
await button.click();
|
||||
const floorLabels = page.locator("#floor-controls label");
|
||||
const floorLabelCount = await floorLabels.count();
|
||||
if (floorLabelCount > 0) {
|
||||
const floorLabel = floorLabels.nth(0);
|
||||
const label = (await floorLabel.innerText()).trim();
|
||||
await floorLabel.click();
|
||||
await page.waitForTimeout(150);
|
||||
const hashWritten = await page.evaluate(() => window.location.hash.length > 1);
|
||||
await button.click();
|
||||
await floorLabel.click();
|
||||
await page.waitForTimeout(150);
|
||||
checks.push({
|
||||
name: "desktop:floor-state",
|
||||
|
||||
Reference in New Issue
Block a user