修复地图起点确认弹窗闪退
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-28 20:16:28 +08:00
parent 93bfb7e778
commit 0380a4f875
3 changed files with 73 additions and 7 deletions

View File

@@ -13,6 +13,23 @@ const point = (name: string, floorLabel: string) => ({
})
describe('RoutePlannerPanel', () => {
it('忽略打开确认层的同一次点击,再响应后续确认或取消操作', async () => {
const wrapper = mount(RoutePlannerPanel, {
props: {
startCandidate: point('服务台', '1F')
}
})
await wrapper.get('.route-confirm-mask').trigger('tap')
await wrapper.get('.route-confirm-action.primary').trigger('tap')
expect(wrapper.emitted('cancelStart')).toBeUndefined()
expect(wrapper.emitted('confirmStart')).toBeUndefined()
await new Promise<void>((resolve) => window.setTimeout(resolve, 350))
await wrapper.get('.route-confirm-action.primary').trigger('tap')
expect(wrapper.emitted('confirmStart')).toEqual([[expect.objectContaining({ poiId: '服务台' })]])
})
it('在导航副标题中显示起点和终点楼层', () => {
const wrapper = mount(RoutePlannerPanel, {
props: {