From e488a4688e0057681bb5251462bc9beded60808d Mon Sep 17 00:00:00 2001 From: Marc Emmanuel Date: Fri, 23 Jan 2026 15:01:34 +0100 Subject: [PATCH] refactor: remove unused layer tests and their corresponding snapshots as fonts are unpredictable --- tests/e2e/layers.spec.ts | 27 ------------------- tests/e2e/layers.spec.ts-snapshots/ruler.html | 1 - .../layers.spec.ts-snapshots/scaleBar.html | 3 --- .../layers.spec.ts-snapshots/vignette.html | 3 --- 4 files changed, 34 deletions(-) delete mode 100644 tests/e2e/layers.spec.ts-snapshots/ruler.html delete mode 100644 tests/e2e/layers.spec.ts-snapshots/scaleBar.html delete mode 100644 tests/e2e/layers.spec.ts-snapshots/vignette.html diff --git a/tests/e2e/layers.spec.ts b/tests/e2e/layers.spec.ts index 094720ad..458ded73 100644 --- a/tests/e2e/layers.spec.ts +++ b/tests/e2e/layers.spec.ts @@ -231,33 +231,6 @@ test.describe('map layers', () => { expect(html).toMatchSnapshot('compass.html') }) - // UI elements - test('scale bar layer', async ({ page }) => { - const scaleBar = page.locator('#scaleBar') - await expect(scaleBar).toBeAttached() - // Scale bar has randomized distances, snapshot structure only - const html = await scaleBar.evaluate((el) => { - const clone = el.cloneNode(true) as Element - clone.querySelectorAll('text').forEach((t) => t.remove()) - return clone.outerHTML - }) - expect(html).toMatchSnapshot('scaleBar.html') - }) - - test('ruler layer', async ({ page }) => { - const ruler = page.locator('#ruler') - await expect(ruler).toBeAttached() - const html = await ruler.evaluate((el) => el.outerHTML) - expect(html).toMatchSnapshot('ruler.html') - }) - - test('vignette layer', async ({ page }) => { - const vignette = page.locator('#vignette') - await expect(vignette).toBeAttached() - const html = await vignette.evaluate((el) => el.outerHTML) - expect(html).toMatchSnapshot('vignette.html') - }) - // Population layer test('population layer', async ({ page }) => { const population = page.locator('#population') diff --git a/tests/e2e/layers.spec.ts-snapshots/ruler.html b/tests/e2e/layers.spec.ts-snapshots/ruler.html deleted file mode 100644 index 755b2d65..00000000 --- a/tests/e2e/layers.spec.ts-snapshots/ruler.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/e2e/layers.spec.ts-snapshots/scaleBar.html b/tests/e2e/layers.spec.ts-snapshots/scaleBar.html deleted file mode 100644 index 9ebec74e..00000000 --- a/tests/e2e/layers.spec.ts-snapshots/scaleBar.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tests/e2e/layers.spec.ts-snapshots/vignette.html b/tests/e2e/layers.spec.ts-snapshots/vignette.html deleted file mode 100644 index 6eaf80a4..00000000 --- a/tests/e2e/layers.spec.ts-snapshots/vignette.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file