修复小程序讲解内部返回控件
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-28 14:42:02 +08:00
parent 2fb70fa1e3
commit 06ad609e1f
5 changed files with 19 additions and 9 deletions

View File

@@ -52,7 +52,7 @@ const GuidePageFrameStub = defineComponent({
const ExplainGuideStopCatalogStub = defineComponent({
name: 'ExplainGuideStopCatalog',
props: ['guideStops', 'selectedHallName', 'loading', 'loadingMore', 'hasMore', 'error', 'loadMoreError'],
props: ['guideStops', 'selectedHallName', 'showEmbeddedBack', 'loading', 'loadingMore', 'hasMore', 'error', 'loadMoreError'],
emits: ['back', 'retry', 'retryMore', 'guideStopClick'],
setup(_, { emit }) {
return {
@@ -200,6 +200,8 @@ describe('讲解对象列表返回', () => {
testState.onLoadHandler?.({ hallId: 'hall-1', hallName: '恐龙厅', returnToHallList: '1' })
await flushPromises()
expect(wrapper.getComponent(ExplainGuideStopCatalogStub).props('showEmbeddedBack')).toBe(true)
await wrapper.get('[data-testid="detail-click"]').trigger('click')
const detailUrl = vi.mocked(uni.navigateTo).mock.calls[0]?.[0]?.url || ''
expect(new URLSearchParams(detailUrl.split('?')[1]).get('returnToHallList')).toBe('1')