mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-9546] knowledge retrieval question is repeated when new question is asked (#4555)
* [ACS-9546] Fixed repeating displayed question for knowledge retrieval * [ACS-9546] Fixed not displayed border around answer * [ACS-9546] Unit tests
This commit is contained in:
@@ -465,6 +465,13 @@ describe('SearchAiInputComponent', () => {
|
||||
submittingTrigger();
|
||||
expect(modalAiSpy).toHaveBeenCalledWith(jasmine.any(Function));
|
||||
});
|
||||
|
||||
it('should call reset on queryControl', () => {
|
||||
spyOn(component.queryControl, 'reset');
|
||||
submittingTrigger();
|
||||
|
||||
expect(component.queryControl.reset).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@@ -163,7 +163,7 @@ export class SearchAiInputComponent implements OnInit {
|
||||
this.modalAiService.openUnsavedChangesModal(() => this.search());
|
||||
}
|
||||
|
||||
search() {
|
||||
private search(): void {
|
||||
const error = this.searchAiService.checkSearchAvailability(this.selectedNodesState);
|
||||
if (error) {
|
||||
this.notificationService.showError(error);
|
||||
@@ -175,6 +175,7 @@ export class SearchAiInputComponent implements OnInit {
|
||||
this.userPreferencesService.set(this.storedNodesKey, JSON.stringify(this.selectedNodesState));
|
||||
this.store.dispatch(new SearchByTermAiAction(payload));
|
||||
this.store.dispatch(new ToggleAISearchInput(this.agentControl.value.id, this.queryControl.value));
|
||||
this.queryControl.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@
|
||||
padding: 18px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--adf-card-view-border-color);
|
||||
border: 1px solid var(--adf-theme-foreground-divider-color);
|
||||
border-radius: 12px;
|
||||
margin: 16px 0 75px;
|
||||
|
||||
|
@@ -108,6 +108,6 @@ describe('SidenavComponent', () => {
|
||||
component.ngOnInit();
|
||||
routerEvents$.next(mockNavigationEnd);
|
||||
|
||||
expect(navigationHistoryService.setHistory).toHaveBeenCalledWith(mockNavigationEnd, 3);
|
||||
expect(navigationHistoryService.setHistory).toHaveBeenCalledWith(mockNavigationEnd);
|
||||
});
|
||||
});
|
||||
|
@@ -78,7 +78,7 @@ export class SidenavComponent implements OnInit {
|
||||
.listenToRouteChanges()
|
||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe((event: NavigationEnd) => {
|
||||
this.navigationHistoryService.setHistory(event, 3);
|
||||
this.navigationHistoryService.setHistory(event);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user