Fix: some random frontend fixes and coverage
This commit is contained in:
@@ -111,4 +111,12 @@ describe('DocumentCardSmallComponent', () => {
|
||||
fixture.debugElement.queryAll(By.directive(TagComponent))
|
||||
).toHaveLength(6)
|
||||
})
|
||||
|
||||
it('should try to close the preview on mouse leave', () => {
|
||||
component.popupPreview = {
|
||||
close: jest.fn(),
|
||||
} as any
|
||||
component.mouseLeaveCard()
|
||||
expect(component.popupPreview.close).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -94,7 +94,7 @@ export class DocumentCardSmallComponent extends ComponentWithPermissions {
|
||||
}
|
||||
|
||||
mouseLeaveCard() {
|
||||
this.popupPreview.close()
|
||||
this.popupPreview?.close()
|
||||
}
|
||||
|
||||
get notesEnabled(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user