From 90c403ae9e9bbdd4ac440dfec16db247ca2aca3b Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Tue, 25 Jun 2019 15:37:24 +0100 Subject: [PATCH] [ADF-4707] add properties in node selector search (#4878) * add properties in node selector search * fix test --- .../content-node-selector-panel.component.spec.ts | 2 +- .../content-node-selector.service.spec.ts | 3 ++- .../content-node-selector/content-node-selector.service.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/content-services/content-node-selector/content-node-selector-panel.component.spec.ts b/lib/content-services/content-node-selector/content-node-selector-panel.component.spec.ts index 06eaf1aed0..3e2174456f 100644 --- a/lib/content-services/content-node-selector/content-node-selector-panel.component.spec.ts +++ b/lib/content-services/content-node-selector/content-node-selector-panel.component.spec.ts @@ -331,7 +331,7 @@ describe('ContentNodeSelectorComponent', () => { query: { query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm }, - include: ['path', 'allowableOperations'], + include: ['path', 'allowableOperations', 'properties'], paging: { maxItems: 25, skipCount: skipCount diff --git a/lib/content-services/content-node-selector/content-node-selector.service.spec.ts b/lib/content-services/content-node-selector/content-node-selector.service.spec.ts index 91d10d683a..e07d813773 100644 --- a/lib/content-services/content-node-selector/content-node-selector.service.spec.ts +++ b/lib/content-services/content-node-selector/content-node-selector.service.spec.ts @@ -23,6 +23,7 @@ import { ContentTestingModule } from '../testing/content.testing.module'; class SearchServiceMock { public query: QueryBody; + searchByQueryBody(query: QueryBody) { this.query = query; } @@ -56,7 +57,7 @@ describe('ContentNodeSelectorService', () => { it('should make it including the path and allowableOperations', () => { service.search('nuka cola quantum'); - expect(search.query.include).toEqual(['path', 'allowableOperations']); + expect(search.query.include).toEqual(['path', 'allowableOperations', 'properties']); }); it('should make the search restricted to nodes only', () => { diff --git a/lib/content-services/content-node-selector/content-node-selector.service.ts b/lib/content-services/content-node-selector/content-node-selector.service.ts index a725d6cf67..9996b70bdf 100644 --- a/lib/content-services/content-node-selector/content-node-selector.service.ts +++ b/lib/content-services/content-node-selector/content-node-selector.service.ts @@ -60,7 +60,7 @@ export class ContentNodeSelectorService { query: { query: `${searchTerm}* OR name:${searchTerm}*` }, - include: ['path', 'allowableOperations'], + include: ['path', 'allowableOperations', 'properties'], paging: { maxItems: maxItems, skipCount: skipCount