[AAE-4203][AAE-4292] - Fix breadcrumb and folder navigation issues wh… (#6719)

* [AAE-4203][AAE-4292] - Fix breadcrumb and folder navigation issues when in search results

* Remove e2e workaround double clicking 2 times
This commit is contained in:
arditdomi
2021-02-23 08:05:29 +00:00
committed by GitHub
parent 4a54e8523b
commit 20500bb151
3 changed files with 9 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -127,8 +127,6 @@ export class ContentNodeSelectorDialogPage {
}
async doubleClickContentNodeSelectorResult(name: string): Promise<void> {
// First click to select from search mode and second click to actually open node
await this.dataTable.doubleClickRowByContent(name);
await this.dataTable.doubleClickRowByContent(name);
}