- 使用真实讲解编号解析接口替换本地演示映射 - 成功后复用现有详情页并自动播放讲解 - 增加查询状态、业务错误提示和相关测试 Made-with: Proma
This commit is contained in:
@@ -256,6 +256,26 @@ describe('讲解详情音频优先布局', () => {
|
||||
}), expect.objectContaining({ displayMode: 'mini' }))
|
||||
})
|
||||
|
||||
it('编号入口加载详情后自动发起一次播放', async () => {
|
||||
mount(ExhibitDetail, {
|
||||
global: { stubs: { GuidePageFrame: GuidePageFrameStub } }
|
||||
})
|
||||
|
||||
await mocks.onLoadHandler?.({
|
||||
id: exhibit.id,
|
||||
stopId: 'stop-1',
|
||||
autoplay: '1',
|
||||
entry: 'code'
|
||||
})
|
||||
await flushPromises()
|
||||
|
||||
expect(mocks.play).toHaveBeenCalledTimes(1)
|
||||
expect(mocks.play).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ audioUrl: exhibit.audioUrl }),
|
||||
expect.objectContaining({ displayMode: 'mini' })
|
||||
)
|
||||
})
|
||||
|
||||
it('加载中使用同一高度底栏和不确定进度', async () => {
|
||||
audioState.currentAudio.value = { id: 'audio-1' }
|
||||
audioState.currentSource.value = { targetType: 'STOP', targetId: 'stop-1', lang: 'en-US' }
|
||||
|
||||
Reference in New Issue
Block a user