mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
GH Auto: Upstream dependencies ADF:8.1.0-14660630465 JS-API:9.1.0-14660630465 using Tag:8.1.0-14660630465 (#4533)
* [ci:force][auto-commit] Update dependencies ADF:8.1.0-14660630465 JS:9.1.0-14660630465 * [ACS-9564] Fix rendering of Knowledge Retrieval answer after change in answer structure * incease viewer load time waiting * exclude test XAT-5470 ACS-9580 --------- Co-authored-by: DenysVuika <503991+DenysVuika@users.noreply.github.com> Co-authored-by: Aleksander Sklorz <Aleksander.Sklorz@hyland.com> Co-authored-by: akashrathod28 <akash.rathod@hyland.com>
This commit is contained in:
@@ -46,7 +46,14 @@ import { searchAiMarkedOptions } from './search-ai-marked-options';
|
||||
|
||||
const questionMock: QuestionModel = { question: 'test', questionId: 'testId', restrictionQuery: { nodesIds: [] } };
|
||||
const getAiAnswerEntry = (noAnswer?: boolean): AiAnswerEntry => {
|
||||
return { entry: { answer: noAnswer ? '' : 'Some answer', questionId: 'some id', references: [] } };
|
||||
return {
|
||||
entry: {
|
||||
answer: noAnswer ? '' : 'Some answer',
|
||||
question: 'some question',
|
||||
objectReferences: [],
|
||||
complete: true
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
describe('SearchAiResultsComponent', () => {
|
||||
@@ -512,7 +519,12 @@ describe('SearchAiResultsComponent', () => {
|
||||
spyOn(userPreferencesService, 'set');
|
||||
spyOn(userPreferencesService, 'get').and.returnValue(knowledgeRetrievalNodes);
|
||||
const answer = getAiAnswerEntry();
|
||||
answer.entry.references = [{ referenceId: nodeId, referenceText: 'some text' }];
|
||||
answer.entry.objectReferences = [
|
||||
{
|
||||
objectId: nodeId,
|
||||
references: []
|
||||
}
|
||||
];
|
||||
spyOn(searchAiService, 'getAnswer').and.returnValues(throwError('error'), of(answer));
|
||||
mockQueryParams.next({ query: 'test', agentId: 'agentId1' });
|
||||
|
||||
|
@@ -198,7 +198,7 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit {
|
||||
}
|
||||
this.queryAnswer = response.entry;
|
||||
this._displayedAnswer = this.preprocessMarkdownFormat(response.entry.answer);
|
||||
return forkJoin(this.queryAnswer.references.map((reference) => this.nodesApiService.getNode(reference.referenceId)));
|
||||
return forkJoin(this.queryAnswer.objectReferences.map((reference) => this.nodesApiService.getNode(reference.objectId)));
|
||||
}),
|
||||
retryWhen((errors: Observable<Error>) => this.aiSearchRetryWhen(errors)),
|
||||
finalize(() => (this._loading = false)),
|
||||
|
@@ -67,7 +67,7 @@ export class ViewerComponent extends BaseComponent {
|
||||
if (waitForViewerContent) {
|
||||
await this.waitForViewerLoaderToFinish();
|
||||
}
|
||||
await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.medium });
|
||||
await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.large });
|
||||
}
|
||||
|
||||
async isViewerOpened(): Promise<boolean> {
|
||||
|
Reference in New Issue
Block a user