fix(test): wait for the window to leave fullscreen before a resize and give the integration suite 30 minutes

This commit is contained in:
shira committed 2026-10-11 19:35:32 +03:00
1 parent 9344228e84
commit e4de6d0f9a
5 files changed
+14 -8

No files matched your search

+7 -1
View File
@@ -20,8 +20,14 @@ export async function resizeViewport(
if (wasFullscreen) {
await page.evaluate(() => document.exitFullscreen());
await expect.poll(() => page.evaluate(() => document.fullscreenElement)).toBeNull();
// The window can stay in the fullscreen state for a moment after the
// document left it, and the browser refuses the resize until it is restored.
await expect(async () => {
await page.setViewportSize(size);
}).toPass({ timeout: 10_000 });
} else {
await page.setViewportSize(size);
}
await page.setViewportSize(size);
if (!wasFullscreen) return;
const continueButton = page.getByRole("button", { name: continueInFullscreenName });