Let waitForEngine take any engine picker value

The check added for a missing engine kind rejected navara-hd, a picker
value the HD scenario waits for.
This commit is contained in:
German Khokhlov committed 2026-11-11 14:54:50 +04:00
1 parent 2d0aa25e35
commit 6a7fed6cb7
1 file changed
+3 -2
+3 -2
View File
@@ -747,8 +747,9 @@ export async function pickEngine(
/** Wait until `kind` runs, its picker is idle and its view is restored. */ /** Wait until `kind` runs, its picker is idle and its view is restored. */
export async function waitForEngine(page, kind, { timeout = 120000 } = {}) { export async function waitForEngine(page, kind, { timeout = 120000 } = {}) {
if (kind !== 'cesium' && kind !== 'navara') // The engine picker's value: cesium, navara or a Navara variant.
throw new TypeError(`waitForEngine needs the engine kind, got ${kind}`); if (typeof kind !== 'string' || !kind)
throw new TypeError('waitForEngine needs the engine picker value');
const started = Date.now(); const started = Date.now();
await page.waitForFunction( await page.waitForFunction(
(expected) => (expected) =>