mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-22 07:48:13 +00:00
Enhancement: navbar upload button (#14442)
This commit is contained in:
1 parent
8ea31cb3ce
commit
c105486b6a
10 files changed
+96
-19
No files matched your search
+4
-8
@@ -85,15 +85,11 @@ describe('UploadFileWidgetComponent', () => {
|
||||
'file.pdf'
|
||||
)
|
||||
const fileInput = fixture.debugElement.query(By.css('input'))
|
||||
jest.spyOn(fileInput.nativeElement, 'files', 'get').mockReturnValue({
|
||||
item: () => file,
|
||||
length: 1,
|
||||
[Symbol.iterator]: () => ({
|
||||
next: () => ({ done: false, value: file }),
|
||||
}),
|
||||
} as any)
|
||||
jest
|
||||
.spyOn(fileInput.nativeElement, 'files', 'get')
|
||||
.mockReturnValue([file] as any)
|
||||
fileInput.nativeElement.dispatchEvent(new Event('change'))
|
||||
expect(uploadSpy).toHaveBeenCalled()
|
||||
expect(uploadSpy).toHaveBeenCalledWith(file)
|
||||
})
|
||||
|
||||
it('should generate stats summary', () => {
|
||||
|
||||
Reference in new issue
Block a user