Files
frontend-miniapp/tests/unit/floorPresentation.spec.ts
lyf 97788a3e9f
Some checks failed
CI / verify (push) Has been cancelled
统一中间层楼层展示为MF
2026-07-19 16:37:16 +08:00

18 lines
751 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, it } from 'vitest'
import { formatNavFloorLabel, navFloorIdFromLabel } from '@/data/adapters/navAssetsAdapter'
import { formatSgsFloorLabel } from '@/data/adapters/sgsSdkGuideAdapter'
import { getFloorSortLevel, isIndoorNavigableFloor } from '@/domain/guideFloor'
describe('中间层游客展示', () => {
it('将稳定层 ID L1.5 显示为 MF并可反向解析', () => {
expect(formatNavFloorLabel('L1.5')).toBe('MF')
expect(navFloorIdFromLabel('MF')).toBe('L1.5')
expect(formatSgsFloorLabel('L1.5')).toBe('MF')
})
it('MF 保持可导航和正确的楼层排序', () => {
expect(isIndoorNavigableFloor({ label: 'MF' })).toBe(true)
expect(getFloorSortLevel({ label: 'MF' })).toBe(1.5)
})
})