mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2242] Search on custom sources is not working. (#2904)
* [ADF-2242] Search on custom sources is not working. fix search on custom sources * [ADF-2242] added unit tests * [ADF-2242] reverted change * [ADF-2242] simplify code on search method and make extra call only when having custom dropdown defined
This commit is contained in:
committed by
Eugenio Romano
parent
5ee9b09a21
commit
78c6a68e51
@@ -103,4 +103,22 @@ describe('ContentNodeSelectorService', () => {
|
||||
|
||||
expect(search.query.filterQueries).not.toContain({ query: 'ANCESTOR:\'workspace://SpacesStore/null\'' });
|
||||
});
|
||||
|
||||
it('should filter for the extra provided ancestors if defined', () => {
|
||||
service.search('nuka cola quantum', 'diamond-city', 0, 25, ['extra-diamond-city']);
|
||||
|
||||
expect(search.query.filterQueries).toContain({ query: 'ANCESTOR:\'workspace://SpacesStore/diamond-city\' OR ANCESTOR:\'workspace://SpacesStore/extra-diamond-city\'' });
|
||||
});
|
||||
|
||||
it('should NOT filter for extra ancestors if an empty list of ids is provided', () => {
|
||||
service.search('nuka cola quantum', 'diamond-city', 0, 25, []);
|
||||
|
||||
expect(search.query.filterQueries).toContain({ query: 'ANCESTOR:\'workspace://SpacesStore/diamond-city\'' });
|
||||
});
|
||||
|
||||
it('should NOT filter for the extra provided ancestor if it\'s the same as the rootNodeId', () => {
|
||||
service.search('nuka cola quantum', 'diamond-city', 0, 25, ['diamond-city']);
|
||||
|
||||
expect(search.query.filterQueries).toContain({ query: 'ANCESTOR:\'workspace://SpacesStore/diamond-city\'' });
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user