mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 17:23:25 +00:00
fix: refine map controls and garage layout
This commit is contained in:
@@ -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(')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user