feat(globe): port to CeliumJS
This commit is contained in:
parent
ec03425067
commit
eb7698e034
51 changed files with 3521 additions and 1992 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { test, expect, openPredict, login } from './fixtures';
|
||||
import { test, expect, openPredict, login, sceneObjectCount } from './fixtures';
|
||||
|
||||
test.beforeEach(async ({ context, page }) => {
|
||||
await login(context);
|
||||
|
|
@ -6,14 +6,9 @@ test.beforeEach(async ({ context, page }) => {
|
|||
await page.evaluate(() => localStorage.removeItem('workspaces'));
|
||||
});
|
||||
|
||||
/** Count map layers whose scoped id belongs to a bounding-box scene. */
|
||||
/** Count map objects whose scoped id belongs to a bounding-box scene. */
|
||||
function bboxLayerCount(page: import('@playwright/test').Page) {
|
||||
return page.evaluate(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const map: any = (window as any)._lsvMap;
|
||||
if (!map) return 0;
|
||||
return map.getStyle().layers.filter((l: { id: string }) => l.id.startsWith('bbox')).length;
|
||||
});
|
||||
return sceneObjectCount(page, 'bbox');
|
||||
}
|
||||
|
||||
// Regression: the bounding box is drawn only by WorkspaceRenderer (predict-only).
|
||||
|
|
@ -32,18 +27,10 @@ test('selected forecast bounding box is drawn on the tracking page', async ({ pa
|
|||
|
||||
// Wait for the run to complete (workspace scene appears).
|
||||
await expect
|
||||
.poll(
|
||||
() =>
|
||||
page.evaluate(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const map: any = (window as any)._lsvMap;
|
||||
if (!map) return 0;
|
||||
return map
|
||||
.getStyle()
|
||||
.layers.filter((l: { id: string }) => l.id.startsWith('ws/')).length;
|
||||
}),
|
||||
{ timeout: 75_000, intervals: [1000, 2000, 3000] },
|
||||
)
|
||||
.poll(() => sceneObjectCount(page, 'ws/'), {
|
||||
timeout: 75_000,
|
||||
intervals: [1000, 2000, 3000],
|
||||
})
|
||||
.toBeGreaterThan(0);
|
||||
|
||||
// Enable the bounding box for this forecast.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue