Skip to content

Commit 78c7d80

Browse files
committed
Update test
1 parent 486236d commit 78c7d80

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tests/playwright/tests/settings/reset-css.test .ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ test.describe.serial( 'Reset CSS Setting - Behavior Tests', () => {
2929
await page.goto( '/' );
3030

3131
const themeCssLoaded = cssRequests.some( ( url ) =>
32-
url.includes( '/hello-theme/assets/css/reset.css' ),
32+
url.includes( '/hello-theme/assets/css/reset.css' ) ||
33+
url.includes( '/hello-elementor/assets/css/reset.css' ),
3334
);
3435

3536
expect( themeCssLoaded ).toBeTruthy();
3637

37-
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="hello-theme"][href*="reset.css"]' );
38+
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="reset.css"]' ).first();
3839
await expect( themeCssLink ).toBeAttached();
3940
} );
4041

@@ -57,12 +58,13 @@ test.describe.serial( 'Reset CSS Setting - Behavior Tests', () => {
5758
await page.goto( '/' );
5859

5960
const themeCssLoaded = cssRequests.some( ( url ) =>
60-
url.includes( '/hello-theme/assets/css/reset.css' ),
61+
url.includes( '/hello-theme/assets/css/reset.css' ) ||
62+
url.includes( '/hello-elementor/assets/css/reset.css' ),
6163
);
6264

6365
expect( themeCssLoaded ).toBeFalsy();
6466

65-
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="hello-theme"][href*="reset.css"]' );
67+
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="reset.css"]' ).first();
6668
await expect( themeCssLink ).not.toBeAttached();
6769
} );
6870
} );

tests/playwright/tests/settings/theme-css.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ test.describe.serial( 'Theme CSS Setting - Behavior Tests', () => {
2929
await page.goto( '/' );
3030

3131
const themeCssLoaded = cssRequests.some( ( url ) =>
32-
url.includes( '/hello-theme/assets/css/theme.css' ),
32+
url.includes( '/hello-theme/assets/css/theme.css' ) ||
33+
url.includes( '/hello-elementor/assets/css/theme.css' ),
3334
);
3435

3536
expect( themeCssLoaded ).toBeTruthy();
3637

37-
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="hello-theme"][href*="theme.css"]' );
38+
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="theme.css"]' ).first();
3839
await expect( themeCssLink ).toBeAttached();
3940
} );
4041

@@ -57,12 +58,13 @@ test.describe.serial( 'Theme CSS Setting - Behavior Tests', () => {
5758
await page.goto( '/' );
5859

5960
const themeCssLoaded = cssRequests.some( ( url ) =>
60-
url.includes( '/hello-theme/assets/css/theme.css' ),
61+
url.includes( '/hello-theme/assets/css/theme.css' ) ||
62+
url.includes( '/hello-elementor/assets/css/theme.css' ),
6163
);
6264

6365
expect( themeCssLoaded ).toBeFalsy();
6466

65-
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="hello-theme"][href*="theme.css"]' );
67+
const themeCssLink = page.locator( 'link[rel="stylesheet"][href*="theme.css"]' ).first();
6668
await expect( themeCssLink ).not.toBeAttached();
6769
} );
6870
} );

0 commit comments

Comments
 (0)