@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user