Capture vessel cards after first-run chrome and camera settling

This commit is contained in:
Sameh Khamis committed 2026-09-13 09:13:29 -07:00
1 parent 73135a7ae4
commit 0007ace064
1 file changed
+8 -1
+8 -1
View File
@@ -253,6 +253,10 @@ async function main() {
const page = await browser.newPage();
await page.setViewport({ width: 1600, height: 900 });
await page.evaluateOnNewDocument(() => {
// This harness inspects cards, so keep first-run chrome out of the view.
localStorage.setItem('gev:first-run-mission:v1', 'suppressed');
});
page.on('pageerror', (err) => console.error(` [page-error] ${err.message}`));
await page.goto(APP_URL, { waitUntil: 'domcontentloaded', timeout: 60000 });
@@ -319,7 +323,10 @@ async function main() {
orientation: { heading: p.heading, pitch: p.pitch, roll: 0 },
});
}, port);
const resettled = settled ? true : await page
// A changed camera invalidates the previous settled result. Let the new
// view schedule its tiles before checking readiness again.
await new Promise((resolve) => setTimeout(resolve, 1500));
const resettled = await page
.waitForFunction(() => {
const gev = window.__godsEyeView;
const ais = gev.dataManager.getAll().find((l) => l.id === 'ais-live-vessels');