From 20500bb1512c53bcaa08f25aa331146bd0b63c56 Mon Sep 17 00:00:00 2001 From: arditdomi <32884230+arditdomi@users.noreply.github.com> Date: Tue, 23 Feb 2021 08:05:29 +0000 Subject: [PATCH] =?UTF-8?q?[AAE-4203][AAE-4292]=20-=20Fix=20breadcrumb=20a?= =?UTF-8?q?nd=20folder=20navigation=20issues=20wh=E2=80=A6=20(#6719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [AAE-4203][AAE-4292] - Fix breadcrumb and folder navigation issues when in search results * Remove e2e workaround double clicking 2 times --- .../content-node-selector-panel.component.spec.ts | 8 ++++++++ .../content-node-selector-panel.component.ts | 1 + .../dialog/content-node-selector-dialog.page.ts | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts index 48fc2de566..bea949854a 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts @@ -748,6 +748,14 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed'); })); + it('should folderIdToShow equal the folder node id when navigation changes', () => { + component.folderIdToShow = null; + const folderChangeEvent: NodeEntryEvent = new NodeEntryEvent(fakeNodeEntry); + component.onFolderChange(folderChangeEvent); + + expect(component.folderIdToShow).toEqual(fakeNodeEntry.id); + }); + it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => { spyOn(component, 'clearSearch').and.callThrough(); triggerSearchResults(fakeResultSetPaging); diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts index 2f7426ce9a..bc480fe2f6 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts @@ -538,6 +538,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy { * Sets showingSearchResults state to be able to differentiate between search results or folder results */ onFolderChange($event: NodeEntryEvent): void { + this.folderIdToShow = $event.value.id; this.showingSearchResults = false; this.infiniteScroll = false; this.breadcrumbFolderTitle = null; diff --git a/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts b/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts index 6016dd16a9..0aa03b997f 100644 --- a/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts +++ b/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts @@ -127,8 +127,6 @@ export class ContentNodeSelectorDialogPage { } async doubleClickContentNodeSelectorResult(name: string): Promise { - // First click to select from search mode and second click to actually open node - await this.dataTable.doubleClickRowByContent(name); await this.dataTable.doubleClickRowByContent(name); }