test: open drive settings for volume and pause in browser specs
This commit is contained in:
@@ -96,14 +96,15 @@ test("starts Web Audio synchronously from the visitor gesture and exposes access
|
|||||||
|
|
||||||
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Sound volume" }),
|
page.getByRole("button", { name: "Drive settings" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
// Volume and Pause motion live inside the settings panel since round 5.
|
||||||
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
|
await expect(page.getByLabel("Sound volume level")).toBeVisible();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Pause motion" }),
|
page.getByRole("button", { name: "Pause motion" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
await expect(
|
await page.keyboard.press("Escape");
|
||||||
page.getByRole("button", { name: "Drive settings" }),
|
|
||||||
).toBeVisible();
|
|
||||||
await expect
|
await expect
|
||||||
.poll(() =>
|
.poll(() =>
|
||||||
page.evaluate(
|
page.evaluate(
|
||||||
@@ -194,7 +195,7 @@ test("persists native volume and keeps sound independent from Static motion", as
|
|||||||
await page.goto(distUrl, { waitUntil: "domcontentloaded" });
|
await page.goto(distUrl, { waitUntil: "domcontentloaded" });
|
||||||
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Sound volume" }).click();
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
const volume = page.getByLabel("Sound volume level");
|
const volume = page.getByLabel("Sound volume level");
|
||||||
await volume.fill("0.65");
|
await volume.fill("0.65");
|
||||||
await expect(volume).toHaveValue("0.65");
|
await expect(volume).toHaveValue("0.65");
|
||||||
@@ -204,15 +205,14 @@ test("persists native volume and keeps sound independent from Static motion", as
|
|||||||
)
|
)
|
||||||
.toBe("0.65");
|
.toBe("0.65");
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Drive settings" }).click();
|
|
||||||
await page.getByLabel("Quality control").selectOption("static");
|
await page.getByLabel("Quality control").selectOption("static");
|
||||||
await expect(page.getByRole("button", { name: "Unmute sound" })).toHaveCount(
|
await expect(page.getByRole("button", { name: "Unmute sound" })).toHaveCount(
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
||||||
await expect(volume).toHaveCount(0);
|
// The volume slider shares the open settings panel with Quality.
|
||||||
await page.getByRole("button", { name: "Sound volume" }).click();
|
|
||||||
await expect(volume).toBeVisible();
|
await expect(volume).toBeVisible();
|
||||||
|
await expect(volume).toHaveValue("0.65");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("requires a direct visitor action after browser interruption without creating another graph", async ({
|
test("requires a direct visitor action after browser interruption without creating another graph", async ({
|
||||||
@@ -235,6 +235,13 @@ test("requires a direct visitor action after browser interruption without creati
|
|||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Resume sound" }),
|
page.getByRole("button", { name: "Resume sound" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
// Resume and Mute share one bay slot, so Mute returns only once the context
|
||||||
|
// reports running again: lift the synthetic "interrupted" state first.
|
||||||
|
await page.evaluate(() => {
|
||||||
|
const context = (window as unknown as { __audioContexts: AudioContext[] })
|
||||||
|
.__audioContexts[0];
|
||||||
|
if (context) delete (context as unknown as { state?: string }).state;
|
||||||
|
});
|
||||||
await page.getByRole("button", { name: "Resume sound" }).click();
|
await page.getByRole("button", { name: "Resume sound" }).click();
|
||||||
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Mute sound" })).toBeVisible();
|
||||||
await expect
|
await expect
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ test("persisted lifecycle events preserve paused and Static states without dupli
|
|||||||
);
|
);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
||||||
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
await page.getByRole("button", { name: "Pause motion" }).click();
|
await page.getByRole("button", { name: "Pause motion" }).click();
|
||||||
|
await page.keyboard.press("Escape");
|
||||||
await dispatchPersistedPageTransition(page, "pagehide");
|
await dispatchPersistedPageTransition(page, "pagehide");
|
||||||
await dispatchPersistedPageTransition(page, "pageshow");
|
await dispatchPersistedPageTransition(page, "pageshow");
|
||||||
await expect(page.locator(".journey-canvas")).toHaveCount(1);
|
await expect(page.locator(".journey-canvas")).toHaveCount(1);
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ test("provides native motion and quality controls with visible state", async ({
|
|||||||
await expect(page.getByRole("status")).toHaveCount(0);
|
await expect(page.getByRole("status")).toHaveCount(0);
|
||||||
await page.keyboard.press("Escape");
|
await page.keyboard.press("Escape");
|
||||||
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
await page.getByRole("button", { name: "Play soundtrack" }).click();
|
||||||
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Pause motion" }),
|
page.getByRole("button", { name: "Pause motion" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
@@ -161,6 +162,7 @@ test("provides native motion and quality controls with visible state", async ({
|
|||||||
.getAttribute("data-scene-generation");
|
.getAttribute("data-scene-generation");
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Pause motion" }).click();
|
await page.getByRole("button", { name: "Pause motion" }).click();
|
||||||
|
await page.keyboard.press("Escape");
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Resume motion" }),
|
page.getByRole("button", { name: "Resume motion" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
@@ -174,9 +176,11 @@ test("provides native motion and quality controls with visible state", async ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Resume motion" }).click();
|
await page.getByRole("button", { name: "Resume motion" }).click();
|
||||||
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Pause motion" }),
|
page.getByRole("button", { name: "Pause motion" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
await page.keyboard.press("Escape");
|
||||||
await expect(canvas).toHaveCount(1);
|
await expect(canvas).toHaveCount(1);
|
||||||
await expect(page.locator(".journey-world")).toHaveAttribute(
|
await expect(page.locator(".journey-world")).toHaveAttribute(
|
||||||
"data-scene-generation",
|
"data-scene-generation",
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ test.describe("production visual composition", () => {
|
|||||||
await expect(
|
await expect(
|
||||||
page.getByRole("button", { name: "Mute sound" }),
|
page.getByRole("button", { name: "Mute sound" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
await page.getByRole("button", { name: "Sound volume" }).click();
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
await expect(page.getByLabel("Sound volume level")).toHaveValue("0.4");
|
await expect(page.getByLabel("Sound volume level")).toHaveValue("0.4");
|
||||||
await captureViewport(page, testInfo, "visual-audio-running");
|
await captureViewport(page, testInfo, "visual-audio-running");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
|
|||||||
);
|
);
|
||||||
await dispatchWheelBurst(page, cdp, at, 1_500, 100);
|
await dispatchWheelBurst(page, cdp, at, 1_500, 100);
|
||||||
await at(2_350);
|
await at(2_350);
|
||||||
await page.getByRole("button", { name: "Sound volume" }).click();
|
await page.getByRole("button", { name: "Drive settings" }).click();
|
||||||
await at(2_400);
|
await at(2_400);
|
||||||
const volumeSlider = page.getByRole("slider", { name: "Sound volume" });
|
const volumeSlider = page.getByRole("slider", { name: "Sound volume" });
|
||||||
await expect(volumeSlider).toBeVisible();
|
await expect(volumeSlider).toBeVisible();
|
||||||
|
|||||||
Reference in New Issue
Block a user