This commit is contained in:
@@ -143,6 +143,26 @@ afterEach(() => {
|
||||
})
|
||||
|
||||
describe('点位详情实际渲染与返回闭环', () => {
|
||||
it('解析目标楼层和点位后才挂载地图,避免默认楼层中间帧', async () => {
|
||||
const wrapper = mountDetail()
|
||||
|
||||
expect(wrapper.find('[data-testid="guide-map-shell"]').exists()).toBe(false)
|
||||
expect(wrapper.get('[data-testid="facility-map-loading"]').text()).toContain('正在准备位置预览')
|
||||
|
||||
await loadDetail({
|
||||
id: encodeURIComponent(facilityPoi.id),
|
||||
target: encodeURIComponent(facilityPoi.name),
|
||||
floorId: facilityPoi.floorId,
|
||||
floorLabel: facilityPoi.floorLabel
|
||||
})
|
||||
|
||||
expect(wrapper.getComponent(GuideMapShellStub).props('activeFloor')).toBe('floor-l2')
|
||||
expect(wrapper.getComponent(GuideMapShellStub).props('targetFocusRequest')).toMatchObject({
|
||||
poiId: facilityPoi.id,
|
||||
floorId: facilityPoi.floorId
|
||||
})
|
||||
})
|
||||
|
||||
it('只展示真实详情字段,并向地图发送正确楼层与点位定位请求', async () => {
|
||||
const wrapper = mountDetail()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user