Fix: some random frontend fixes and coverage

This commit is contained in:
shamoon committed 2024-12-04 21:15:45 -08:00
1 parent df2c139721
commit 0c883d064e
7 files changed
+49 -18

No files matched your search

@@ -120,4 +120,12 @@ describe('DocumentCardLargeComponent', () => {
expect(fixture.nativeElement.textContent).toContain('bananas')
expect(component.searchNoteHighlights).toContain('<span>bananas</span>')
})
it('should try to close the preview on mouse leave', () => {
component.popupPreview = {
close: jest.fn(),
} as any
component.mouseLeaveCard()
expect(component.popupPreview.close).toHaveBeenCalled()
})
})
@@ -108,12 +108,8 @@ export class DocumentCardLargeComponent extends ComponentWithPermissions {
return this.documentService.getDownloadUrl(this.document.id)
}
get previewUrl() {
return this.documentService.getPreviewUrl(this.document.id)
}
mouseLeaveCard() {
this.popupPreview.close()
this.popupPreview?.close()
}
get contentTrimmed() {