@@ -83,7 +83,7 @@ describe('讲解展厅选择列表', () => {
|
||||
})
|
||||
|
||||
const card = wrapper.get('.hall-overview-card')
|
||||
expect(wrapper.get('.header-title').text()).toBe('展厅讲解')
|
||||
expect(wrapper.get('.header-title').text()).toBe('免费讲解')
|
||||
expect(card.attributes('style')).toContain('--hall-card-color: #d9b06c')
|
||||
expect(card.text()).toContain('恐龙厅')
|
||||
expect(card.text()).not.toContain('Dinosaur Hall')
|
||||
|
||||
@@ -106,13 +106,13 @@ describe('讲解展厅列表返回', () => {
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('独立页在微信嵌入态强制提供 H5 返回,并保留宿主识别参数', async () => {
|
||||
it('微信嵌入态由宿主导航提供标题与返回,不渲染重复的 H5 页头', async () => {
|
||||
hostEnvironmentMocks.embeddedInWechatMiniProgram = true
|
||||
window.location.hash = '#/pages/explain/list?embedded=wechat-mini-program&weapp=1'
|
||||
window.history.replaceState({}, '', window.location.href)
|
||||
const wrapper = mountExplainList()
|
||||
|
||||
expect(wrapper.getComponent(ExplainHallSelectStub).props('forceInternalHeader')).toBe(true)
|
||||
expect(wrapper.getComponent(ExplainHallSelectStub).props('forceInternalHeader')).toBe(false)
|
||||
await wrapper.get('[data-testid="explain-list-back"]').trigger('click')
|
||||
|
||||
expect(uni.navigateBack).not.toHaveBeenCalled()
|
||||
|
||||
Reference in New Issue
Block a user