mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-09-21 00:48:32 +00:00
Tweakhancement: use fixed position instead of display none (#12706)
This commit is contained in:
@@ -2221,10 +2221,20 @@ describe('DocumentDetailComponent', () => {
|
||||
expect(createElementSpy).toHaveBeenCalledWith('iframe')
|
||||
expect(appendChildSpy).toHaveBeenCalledWith(mockIframe)
|
||||
expect(createObjectURLSpy).toHaveBeenCalledWith(blob)
|
||||
expect(mockIframe.style).toEqual({
|
||||
position: 'fixed',
|
||||
right: '0',
|
||||
bottom: '0',
|
||||
width: '0',
|
||||
height: '0',
|
||||
border: '0',
|
||||
visibility: 'hidden',
|
||||
})
|
||||
|
||||
if (mockIframe.onload) {
|
||||
mockIframe.onload({} as any)
|
||||
}
|
||||
tick()
|
||||
|
||||
expect(mockContentWindow.focus).toHaveBeenCalled()
|
||||
expect(mockContentWindow.print).toHaveBeenCalled()
|
||||
@@ -2337,6 +2347,7 @@ describe('DocumentDetailComponent', () => {
|
||||
mockIframe.onload(new Event('load'))
|
||||
}
|
||||
|
||||
tick()
|
||||
tick(200)
|
||||
|
||||
if (expectToast) {
|
||||
|
||||
Reference in New Issue
Block a user