refactor: remove unused layer tests and their corresponding snapshots as fonts are unpredictable

This commit is contained in:
Marc Emmanuel 2026-01-23 15:01:34 +01:00
parent 6ea2ae867b
commit e488a4688e
4 changed files with 0 additions and 34 deletions

View file

@ -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')

View file

@ -1 +0,0 @@
<g id="ruler" style="display: none;"></g>

View file

@ -1,3 +0,0 @@
<g id="scaleBar" opacity="1" fill="#353540" font-size="10" data-bar-size="2" data-x="99" data-y="99" data-label="" transform="translate(1043,701)">
<rect id="scaleBarBack" opacity="0.2" fill="#ffffff" stroke="#000000" stroke-width="1" filter="url(#blur5)" data-top="20" data-right="15" data-bottom="15" data-left="10" x="-10" y="-20" width="234.109375" height="32"></rect>
<g id="scaleBarContent"><g><line x1="0.5" y1="0" x2="201.5" y2="0" stroke-width="2" stroke="white"></line><line x1="0" y1="2" x2="202" y2="2" stroke-width="2" stroke="#3d3d3d"></line><line x1="0" y1="0" x2="202" y2="0" stroke-width="6" stroke-dasharray="2 38" stroke="#3d3d3d"></line></g><g text-anchor="middle" font-family="var(--serif)"></g></g></g>

View file

@ -1,3 +0,0 @@
<g id="vignette" mask="url(#vignette-mask)" opacity="0.3" fill="#000000">
<rect x="0" y="0" width="100%" height="100%"></rect>
</g>