This commit is contained in:
2026-11-03 16:15:24 +08:00
parent 604e7fb2e1
commit 1afc7034cd
7 changed files with 83 additions and 20 deletions
@@ -207,10 +207,10 @@ it('allows saving photos while loading and keeps the loading stage', async () =>
vi.mocked(api.getLoadingDocuments).mockResolvedValue(data({ stage: 'LOADING' }))
vi.mocked(api.bindLoadingPhoto).mockResolvedValue(data({ stage: 'LOADING', recordVersion: '1', photos: [photo] }))
const wrapper = setup(); await flushPromises()
expect(wrapper.text()).toContain('可边装车边上传')
expect(wrapper.text()).not.toContain('可边装车边上传')
await upload(wrapper)
expect(wrapper.emitted('saved')).toHaveLength(1)
expect(wrapper.text()).toContain('可边装车边上传'); wrapper.unmount()
expect(wrapper.text()).not.toContain('可边装车边上传'); wrapper.unmount()
})
it('renders the authenticated saved photo and fullscreen preview for a read-only Admin', async () => {