Skip to content

Commit

Permalink
test(quantic): ep analytics tests fixed in the e2e (#4529)
Browse files Browse the repository at this point in the history
## [SFINT-5732](https://coveord.atlassian.net/browse/SFINT-5732)

## Changes made in this PR:

### In Headless:

1. Fixed a typo in type of the event sent when submiting feedback for
RGA, it's now `Rga.SubmitFeedback` instead of `Rga.SubmitRgaFeedback`.

### In Quantic: 

- Fixed all the E2E tests that were previously skipped because of the
latest breaking changes that occurs to schemas of the EP events, in this
tests we check that the right payload is sent and that each analytics
call is valid by sending it to the `validate` endpoint of the Event api.




[SFINT-5732]:
https://coveord.atlassian.net/browse/SFINT-5732?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
mmitiche authored Oct 11, 2024
1 parent 70754a0 commit 435e2c2
Show file tree
Hide file tree
Showing 15 changed files with 624 additions and 1,109 deletions.
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports[`generated answer analytics actions > when analyticsMode is \`next\` > s

exports[`generated answer analytics actions > when analyticsMode is \`next\` > should log #logGeneratedAnswerFeedback with the right payload 1`] = `
[
"Rga.SubmitRgaFeedback",
"Rga.SubmitFeedback",
{
"additionalNotes": undefined,
"correctAnswerUrl": undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports[`generated answer insight analytics actions > when analyticsMode is \`ne

exports[`generated answer insight analytics actions > when analyticsMode is \`next\` > should log #logGeneratedAnswerFeedback with the right payload 1`] = `
[
"Rga.SubmitRgaFeedback",
"Rga.SubmitFeedback",
{
"additionalNotes": undefined,
"correctAnswerUrl": undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const logGeneratedAnswerFeedback = (
...feedback,
});
},
analyticsType: 'Rga.SubmitRgaFeedback',
analyticsType: 'Rga.SubmitFeedback',
analyticsPayloadBuilder: (state): Rga.SubmitFeedback | undefined => {
const {id: rgaID} = generativeQuestionAnsweringIdSelector(state);
if (rgaID) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const logGeneratedAnswerFeedback = (
getCaseContextAnalyticsMetadata(state.insightCaseContext)
);
},
analyticsType: 'Rga.SubmitRgaFeedback',
analyticsType: 'Rga.SubmitFeedback',
analyticsPayloadBuilder: (state): Rga.SubmitFeedback | undefined => {
const {id: rgaID} = generativeQuestionAnsweringIdSelector(state);
if (rgaID) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export const CaseClassificationSelectors: CaseClassificationSelector &
.find('.case-classification-option input')
.eq(idx),
error: () =>
CaseClassificationSelectors.get().find('.slds-form-element__help'),
CaseClassificationSelectors.get().find(
'[data-cy="case-classification-error-message"]'
),
loadingSpinner: () =>
CaseClassificationSelectors.get().find('lightning-spinner'),
componentError: () =>
Expand Down
Loading

0 comments on commit 435e2c2

Please sign in to comment.