mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2061] Fix content node selector search (#2772)
* Fix content node selector search * Fix tests
This commit is contained in:
committed by
Eugenio Romano
parent
19b1507251
commit
3e52127b5c
@@ -373,6 +373,9 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
describe('Search functionality', () => {
|
||||
|
||||
function defaultSearchOptions(searchTerm, rootNodeId = undefined, skipCount = 0) {
|
||||
|
||||
const parentFiltering = rootNodeId ? [ { query: `ANCESTOR:'workspace://SpacesStore/${rootNodeId}'` } ] : [];
|
||||
|
||||
let defaultSearchNode: any = {
|
||||
query: {
|
||||
query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm
|
||||
@@ -384,13 +387,14 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
},
|
||||
filterQueries: [
|
||||
{ query: "TYPE:'cm:folder'" },
|
||||
{ query: 'NOT cm:creator:System' }]
|
||||
{ query: 'NOT cm:creator:System' },
|
||||
...parentFiltering
|
||||
],
|
||||
scope: {
|
||||
locations: ['nodes']
|
||||
}
|
||||
};
|
||||
|
||||
if (rootNodeId) {
|
||||
defaultSearchNode.scope = rootNodeId;
|
||||
}
|
||||
|
||||
return defaultSearchNode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user