Fix: include missing fields for saved view widgets (#8905)

This commit is contained in:
shamoon
2025-01-25 07:49:14 -08:00
committed by GitHub
parent 702de0cac3
commit 8f9a294529
5 changed files with 80 additions and 20 deletions

View File

@@ -24,6 +24,7 @@ import {
FILTER_DOCUMENT_TYPE,
FILTER_FULLTEXT_MORELIKE,
FILTER_HAS_TAGS_ALL,
FILTER_OWNER_ANY,
FILTER_STORAGE_PATH,
} from 'src/app/data/filter-rule-type'
import { SavedView } from 'src/app/data/saved-view'
@@ -295,6 +296,15 @@ describe('SavedViewWidgetComponent', () => {
component.clickStoragePath(11) // coverage
})
it('should navigate via quickfilter on click owner', () => {
const qfSpy = jest.spyOn(documentListViewService, 'quickFilter')
component.clickOwner(11, new MouseEvent('click'))
expect(qfSpy).toHaveBeenCalledWith([
{ rule_type: FILTER_OWNER_ANY, value: '11' },
])
component.clickOwner(11) // coverage
})
it('should navigate via quickfilter on click more like', () => {
const qfSpy = jest.spyOn(documentListViewService, 'quickFilter')
component.clickMoreLike(11)