@@ -32,4 +32,23 @@ describe('VisitorPoiPresentation', () => {
|
||||
expect(result.get('p1')?.displayName).toBe('无障碍卫生间 · 1F · 恐龙厅 · 服务设施')
|
||||
expect(result.get('p2')?.displayName).toBe('无障碍卫生间 · 2F · 生态厅 · 服务设施')
|
||||
})
|
||||
|
||||
it('用稳定序号区分同楼层同区域的重名设施', () => {
|
||||
const result = createVisitorPoiPresentations([
|
||||
poi('p1', '无障碍卫生间', '1F', '恐龙厅'),
|
||||
poi('p2', '无障碍卫生间', '1F', '恐龙厅')
|
||||
])
|
||||
|
||||
expect(result.get('p1')?.displayName).toBe('无障碍卫生间 · 1F · 恐龙厅 · 服务设施')
|
||||
expect(result.get('p2')?.displayName).toBe('无障碍卫生间 · 1F · 恐龙厅 · 服务设施 2')
|
||||
})
|
||||
|
||||
it('省略与名称重复的展厅提示,保留最小位置上下文', () => {
|
||||
const result = createVisitorPoiPresentations([
|
||||
poi('p1', '球幕影院', '1F', '球幕影院')
|
||||
])
|
||||
|
||||
expect(result.get('p1')?.displayName).toBe('球幕影院')
|
||||
expect(result.get('p1')?.locationHint).toBe('1F · 服务设施')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user