Check hidden lines behind the Earth and open the picker panel by keyboard

Cesium culls a line the globe hides whole and does not depth-test lines
against the near side of a keyless globe, so the contract check runs the
hidden line round the back of the Earth to a visible end. The wildlife
switch scenario opens VISUAL PRESETS from the keyboard before tabbing to
the engine picker and reports the page state when no switch follows.
This commit is contained in:
German Khokhlov committed 2026-11-09 13:03:13 +04:00
1 parent 68845a4977
commit 69fbf5b38d
2 files changed
+50 -11

No files matched your search

+25 -2
View File
@@ -247,11 +247,21 @@ await strict.run({}, async (b) => {
box: box ? [box.x, box.y, box.width, box.height] : null,
};
});
// The picker sits in VISUAL PRESETS, out of the Tab order while that
// panel is collapsed: open it from the keyboard too.
if ((await picker()).panel !== 'true') {
await p.focus('#control-panel-toggle');
await p.keyboard.press('Enter');
}
await p
.waitForFunction(
() => {
const el = document.querySelector('#globe-engine');
return el && !el.disabled && el.getBoundingClientRect().height > 0;
return (
el &&
!el.disabled &&
el.checkVisibility({ visibilityProperty: true })
);
},
{ timeout: 30000 },
)
@@ -293,7 +303,20 @@ await strict.run({}, async (b) => {
const tabs = path.length;
const from = await p.$eval('#globe-engine', (el) => el.value);
await p.keyboard.type(kind[0]);
await waitForEngine(p, kind);
await waitForEngine(p, kind).catch(async (error) => {
const state = await p.evaluate(() => ({
engine: window.__godsEyeView?.engine?.kind ?? null,
picker: document.querySelector('#globe-engine')?.value ?? null,
focus: document.activeElement?.id ?? null,
busy: document.querySelector('#globe-engine')?.disabled ?? null,
frame: Boolean(document.querySelector('.engine-switch-frame')),
loading: document.querySelector('#loading-screen')?.className ?? null,
}));
throw Error(
`no ${kind} globe after typing ${kind[0]}: ${JSON.stringify({ from, tabs: path.length, ...state })}`,
{ cause: error },
);
});
assert.equal(
await p.evaluate(() => performance.timeOrigin),
origin,