fix: refine map controls and garage layout

This commit is contained in:
Leon.Schmidt
2026-08-16 22:08:00 +02:00
parent 1bcf04d021
commit c5c9c33c2e
9 changed files with 443 additions and 116 deletions
@@ -0,0 +1,30 @@
import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
const source = readFileSync(new URL('./MapApp.vue', import.meta.url), 'utf8')
describe('MapApp interaction contract', () => {
it('uses Sky UI controls and the central EasyShare store', () => {
expect(source).not.toContain("from 'konsta/vue'")
expect(source).toContain('<SkyAppPage')
expect(source).toContain('<SkyFab')
expect(source).toContain('<SkyGlass')
expect(source).toContain('easyShare.open({')
expect(source).toContain('subtitle: coordinates')
expect(source).not.toContain('<EasyShareSheet')
})
it('keeps zoom and panning inside scale-aware map bounds', () => {
expect(source).toContain('minimumCoverZoom(metrics, baseMinZoom)')
expect(source).toContain('clampMapPan(nextPan, nextZoom, metrics)')
expect(source).toContain('zoomPanAtPoint(')
expect(source).not.toContain("width: 'max(120%, 120vh)'")
})
it('allows the marker crosshair to be placed by tapping the map', () => {
expect(source).toContain('placementPoint.value = viewportPoint({')
expect(source).toContain(':style="placementCrosshairStyle"')
expect(source).toContain('clientPointToMapPercent(')
})
})