File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
compass-e2e-tests/helpers
compass-schema-validation/src/modules Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ export async function setValidation(
1515
1616 await browser . clickVisible ( Selectors . UpdateValidationButton ) ;
1717
18+ // Close toast.
19+ await browser . clickVisible (
20+ Selectors . closeToastButton ( Selectors . ValidationSuccessToast )
21+ ) ;
22+
1823 // both buttons should become hidden if it succeeds
1924 await validationActionMessageElement . waitForDisplayed ( {
2025 reverse : true ,
Original file line number Diff line number Diff line change @@ -1149,6 +1149,8 @@ export const ValidationActionMessage =
11491149 '[data-testid="validation-action-message"]' ;
11501150export const UpdateValidationButton =
11511151 '[data-testid="update-validation-button"]' ;
1152+ export const ValidationSuccessToast =
1153+ '[data-testid="toast-schema-validation-update"]' ;
11521154export const ValidationMatchingDocumentsPreview =
11531155 '[data-testid="validation-content"] [data-testid="matching-documents"] [data-testid="document-preview"]' ;
11541156export const ValidationLoadMatchingDocumentsBtn = `${ ValidationMatchingDocumentsPreview } [data-testid="load-sample-document"]` ;
Original file line number Diff line number Diff line change @@ -451,6 +451,8 @@ export function validationFromCollection(
451451 } ;
452452}
453453
454+ const toastId = 'schema-validation-update' ;
455+
454456/**
455457 * Save validation.
456458 */
@@ -487,7 +489,6 @@ export const saveValidation = (
487489 }
488490 ) ;
489491 dispatch ( fetchValidation ( namespace ) ) ;
490- const toastId = `schema-validation-update-${ new ObjectId ( ) . toString ( ) } ` ;
491492 openToast ( toastId , {
492493 title : 'New validation rules applied' ,
493494 variant : 'success' ,
You can’t perform that action at this time.
0 commit comments