mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -748,6 +748,14 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed');
|
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 () => {
|
it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => {
|
||||||
spyOn(component, 'clearSearch').and.callThrough();
|
spyOn(component, 'clearSearch').and.callThrough();
|
||||||
triggerSearchResults(fakeResultSetPaging);
|
triggerSearchResults(fakeResultSetPaging);
|
||||||
|
@@ -538,6 +538,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
|||||||
* Sets showingSearchResults state to be able to differentiate between search results or folder results
|
* Sets showingSearchResults state to be able to differentiate between search results or folder results
|
||||||
*/
|
*/
|
||||||
onFolderChange($event: NodeEntryEvent): void {
|
onFolderChange($event: NodeEntryEvent): void {
|
||||||
|
this.folderIdToShow = $event.value.id;
|
||||||
this.showingSearchResults = false;
|
this.showingSearchResults = false;
|
||||||
this.infiniteScroll = false;
|
this.infiniteScroll = false;
|
||||||
this.breadcrumbFolderTitle = null;
|
this.breadcrumbFolderTitle = null;
|
||||||
|
@@ -127,8 +127,6 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async doubleClickContentNodeSelectorResult(name: string): Promise<void> {
|
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);
|
await this.dataTable.doubleClickRowByContent(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user