feat: v0.2.8 — reduce dataset to large_airport only; map shows the 260 biggest airports
This commit is contained in:
+9
-8
@@ -42,14 +42,15 @@ test('clicking an airport marker opens a popup with name and ICAO', async ({ pag
|
||||
{ timeout: 15_000 },
|
||||
).toBeGreaterThan(0);
|
||||
|
||||
// Project ESSV (Visby) to screen space via the dev hook, then click it.
|
||||
// Visby (Gotland) is used because its nearest remaining airport after the
|
||||
// small_airport rows were dropped is Stockholm Skavsta across the Baltic Sea,
|
||||
// ~59 px away at the initial zoom, so its marker cannot be overlapped by a
|
||||
// neighbouring circle.
|
||||
// Project UKBB (Boryspil) to screen space via the dev hook, then click it.
|
||||
// Boryspil is used because with only large_airport rows remaining it is the
|
||||
// most isolated marker inside the initial zoom-4 viewport: its nearest
|
||||
// surviving airport is Chişinău (LUKK), ~126 px away at the initial zoom
|
||||
// (Kyiv Zhuliany, geographically closer, was a medium_airport and got cut),
|
||||
// so its marker cannot be overlapped by a neighbouring circle.
|
||||
const pt = await page.evaluate(() => {
|
||||
const map = (window as any).__flightMap;
|
||||
const p = map.project([18.346201, 57.6628]);
|
||||
const p = map.project([30.894699, 50.345001]);
|
||||
const rect = map.getContainer().getBoundingClientRect();
|
||||
return { x: rect.left + p.x, y: rect.top + p.y };
|
||||
});
|
||||
@@ -57,8 +58,8 @@ test('clicking an airport marker opens a popup with name and ICAO', async ({ pag
|
||||
|
||||
const popup = page.getByTestId('airport-popup');
|
||||
await expect(popup).toBeVisible();
|
||||
await expect(popup).toContainText('Visby Airport');
|
||||
await expect(popup).toContainText('ESSV');
|
||||
await expect(popup).toContainText('Boryspil International Airport');
|
||||
await expect(popup).toContainText('UKBB');
|
||||
});
|
||||
|
||||
test('wheel zoom is clamped between min and max zoom', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user