mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-14 21:45:37 -05:00
Fix: track and restore changed document fields from session storage (#10468)
This commit is contained in:
@@ -241,4 +241,15 @@ describe('OpenDocumentsService', () => {
|
||||
openDocumentsService.openDocument(doc)
|
||||
expect(consoleSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should set dirty status with changed fields', () => {
|
||||
subscriptions.push(
|
||||
openDocumentsService.openDocument(documents[0]).subscribe()
|
||||
)
|
||||
const changedFields = { title: 'foo', content: 'bar' }
|
||||
openDocumentsService.setDirty(documents[0], true, changedFields)
|
||||
expect(
|
||||
openDocumentsService.getOpenDocument(documents[0].id).__changedFields
|
||||
).toEqual(['title', 'content'])
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user