Skip to content

Commit

Permalink
test(quantic): fixed quantic e2e after salesforce 25 winter release (#…
Browse files Browse the repository at this point in the history
…4570)

[SFINT-5779](https://coveord.atlassian.net/browse/SFINT-5779)

This PR backports the fix made
[here](#4559).

It is mandatory in order to be able to merge other Quantic fixes in
`v2`.

[SFINT-5779]:
https://coveord.atlassian.net/browse/SFINT-5779?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: mmitiche <mmitiche@coveo.com>
  • Loading branch information
lbergeron and mmitiche authored Oct 22, 2024
1 parent 9ca111d commit 8ee1fec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ describe('quantic-refine-content', () => {
Expect.displayClearAllFiltersButton(true);
Expect.displayDuplicatedTimeframeFacetClearFiltersButton(true);
Expect.displayTimeframeFacetClearFiltersButton(true);
Actions.clickClearAllFilters();
Actions.clickDuplicatedFacetExpandButton();
Actions.clickDuplicatedFacetFirstOption();
Expect.displayClearAllFiltersButton(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ export const TimeframeFacetSelectors: TimeframeFacetSelector = {
applyButton: () =>
TimeframeFacetSelectors.get().find('.timeframe-facet__apply'),
form: () => TimeframeFacetSelectors.get().find('form'),
validationError: () => TimeframeFacetSelectors.form().find('.slds-has-error'),
validationError: () =>
TimeframeFacetSelectors.form().find(
'.slds-form-element__help[data-error-message]'
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ describe('quantic-timeframe-facet', () => {
Actions.submitForm();

Expect.numberOfValidationErrors(2);
Expect.validationError('Complete this field.');
Expect.validationError('Complete this field');
});

scope('when entering then erasing dates', () => {
Actions.typeStartDate(validRange.start);
Actions.submitForm();

Expect.numberOfValidationErrors(1);
Expect.validationError('Complete this field.');
Expect.validationError('Complete this field');

Actions.typeEndDate(validRange.end);
Actions.submitForm();
Expand All @@ -343,7 +343,7 @@ describe('quantic-timeframe-facet', () => {

Expect.numberOfValidationErrors(1);
Expect.validationError(
'Your entry does not match the allowed format yyyy-MM-dd.'
'Your entry does not match the allowed format'
);
});

Expand All @@ -352,7 +352,7 @@ describe('quantic-timeframe-facet', () => {

Expect.numberOfValidationErrors(1);
Expect.validationError(
'Your entry does not match the allowed format yyyy-MM-dd.'
'Your entry does not match the allowed format'
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</div>
</div>
<template if:true={hasError}>
<div class="slds-form-element__help" id="case-classification-error-message">
<div data-cy="case-classification-error-message" class="slds-form-element__help" id="case-classification-error-message">
{errorMessage}
</div>
</template>
Expand Down

0 comments on commit 8ee1fec

Please sign in to comment.