[ACS-8999] rename confirmation button label for closing conversation dialog (#4261)

* [ACS-8999] Renamed confirmation button label for closing conversation dialog in AI results page

* [ACS-8999] Unit tests, set maxWidth
This commit is contained in:
AleksanderSklorz 2024-11-28 12:30:07 +01:00 committed by GitHub
parent ccb3f4e1bf
commit 6734da9825
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 3 deletions

View File

@ -677,7 +677,7 @@
"WARNING": "Warning!",
"ASK_AI": "Ask AI",
"DO_NOT_SHOW_MESSAGE": "Don't show this message again",
"OKAY": "Okay",
"DISCARD_CONVERSATION": "Discard Conversation",
"CONVERSATION_DISCARDED": "This conversation will be discarded",
"LOSE_RESPONSE": "By asking another question you will lose your previous response"
}

View File

@ -421,5 +421,15 @@ describe('SearchAiResultsComponent', () => {
component.ngOnInit();
expect(unsavedChangesGuard.unsaved).toBeTrue();
});
it('should set correct data on unsavedChangesGuard', () => {
component.ngOnInit();
expect(unsavedChangesGuard.data).toEqual({
descriptionText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.CONVERSATION_DISCARDED',
confirmButtonText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.DISCARD_CONVERSATION',
headerText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.WARNING',
maxWidth: 'none'
});
});
});
});

View File

@ -152,8 +152,9 @@ export class SearchAiResultsComponent extends PageComponent implements OnInit {
this.unsavedChangesGuard.unsaved = this.route.snapshot?.queryParams?.query?.length > 0 && !this.hasError;
this.unsavedChangesGuard.data = {
descriptionText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.CONVERSATION_DISCARDED',
confirmButtonText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.OKAY',
headerText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.WARNING'
confirmButtonText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.DISCARD_CONVERSATION',
headerText: 'KNOWLEDGE_RETRIEVAL.SEARCH.DISCARD_CHANGES.WARNING',
maxWidth: 'none'
};
}