@@ -279,14 +279,26 @@ describe('首页搜索与地图闭环', () => {
|
||||
expect(window.location.hash).toBe('#/pages/index/index?tab=guide&embedded=wechat-mini-program')
|
||||
})
|
||||
|
||||
it('首页暂不展示来馆入口及其到馆面板', async () => {
|
||||
it('首页暂不展示来馆入口,导览快捷按钮文案固定且保留原切换行为', async () => {
|
||||
const wrapper = await mountIndex()
|
||||
const map = wrapper.getComponent(GuideMapShellStub)
|
||||
const guideAction = wrapper.findAll('.guide-quick-action')[0]
|
||||
|
||||
expect(wrapper.text()).not.toContain('来馆')
|
||||
expect(wrapper.findAll('.guide-quick-action').map((item) => item.text())).toEqual([
|
||||
'馆内',
|
||||
'导览',
|
||||
'讲解'
|
||||
])
|
||||
|
||||
await guideAction.trigger('tap')
|
||||
await flushPromises()
|
||||
expect(map.props('indoorView')).toBe('floor')
|
||||
expect(wrapper.findAll('.guide-quick-action')[0]?.text()).toBe('导览')
|
||||
|
||||
await guideAction.trigger('tap')
|
||||
await flushPromises()
|
||||
expect(map.props('indoorView')).toBe('overview')
|
||||
expect(wrapper.findAll('.guide-quick-action')[0]?.text()).toBe('导览')
|
||||
})
|
||||
|
||||
it('向搜索面板传入当前楼层,并将分类结果 ID 精确传给地图', async () => {
|
||||
|
||||
Reference in New Issue
Block a user