fix(app): closed hash and canonical-form drawing messages, split crop and drawing views
This commit is contained in:
1 parent
7bf1404946
commit
1bbf97e65b
16 files changed
+487
-248
No files matched your search
@@ -51,6 +51,15 @@ describe('open and sessions', () => {
|
||||
expect(store.getState().previewState?.drawings[0]).toMatchObject({ state: 'missing' })
|
||||
})
|
||||
|
||||
it('records a drawing whose bytes fail the hash check at load', async () => {
|
||||
serverHas(baseText(), 3)
|
||||
sb.downloadSheetDrawing.mockResolvedValue(new TextEncoder().encode('<svg/>'))
|
||||
store.getState().open(VERSION, USER)
|
||||
await vi.waitFor(() => expect(store.getState().status).toBe('ready'))
|
||||
expect(store.getState().drawingFailures[ASSET]).toBe('drawing_hash_mismatch')
|
||||
expect(store.getState().drawings).toEqual([])
|
||||
})
|
||||
|
||||
it('drops a late load after close and frees the preview it built', async () => {
|
||||
const late = deferred<unknown>()
|
||||
sb.getSheetVersion.mockReturnValue(late.promise as never)
|
||||
|
||||
Reference in new issue
Block a user