File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,7 @@ test.describe('Coveo test', () => {
2222 await page . goto ( '/' ) ;
2323 await page . waitForLoadState ( 'load' ) ;
2424 await waitFor ( async ( ) => await handleConsentPopup ( page ) ) ;
25-
26- const excludedTests = [ 'missing coveo credentials' ] ;
27- if ( ! excludedTests . includes ( test . info ( ) . title ) ) {
28- await mockCoveoCredentials ( page , request ) ;
29- }
25+ await mockCoveoCredentials ( page , request ) ;
3026 } ) ;
3127
3228 test . afterEach ( async ( { page } ) => {
@@ -66,13 +62,15 @@ test.describe('Coveo test', () => {
6662
6763 test ( 'missing coveo credentials' , async ( { page } ) => {
6864 const searchEndpoint = 'search.html' ;
69- await page . goto ( `/${ searchEndpoint } ` ) ;
65+ await page . unroute ( `**/${ COVEO_CREDENTIALS_ENDPOINT } ` ) ;
66+ await page . evaluate ( ( ) => window . localStorage . clear ( ) ) ;
7067 await page . route ( `**/${ COVEO_CREDENTIALS_ENDPOINT } ` , async ( route ) => {
7168 await route . fulfill ( {
7269 status : 404 ,
7370 contentType : 'text/html; charset=utf-8' ,
7471 } ) ;
7572 } ) ;
73+ await page . goto ( `/${ searchEndpoint } ` ) ;
7674
7775 const coveoErrorContent = page . getByTestId ( 'coveo-error-content' ) ;
7876 await expect ( coveoErrorContent ) . toBeVisible ( ) ;
You can’t perform that action at this time.
0 commit comments