Skip to content

Commit 5aa9f34

Browse files
committed
fix flaky settings test
1 parent 09d4d5c commit 5aa9f34

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

playwright/e2e/settings/settings.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );
22

33
test.describe( 'Settings page', () => {
4-
test.beforeEach( async ( { admin } ) => {
4+
test( 'Default values are selected', async ( { admin, page } ) => {
55
await admin.visitAdminPage(
66
'options-general.php?page=wp-bootstrap-blocks_settings'
77
);
8-
} );
98

10-
test( 'Default values are selected', async ( { page } ) => {
119
expect(
1210
await page
1311
.locator( '#wp-bootstrap-blocks_bootstrap_version' )
@@ -22,11 +20,15 @@ test.describe( 'Settings page', () => {
2220
await expect( enableCssGridCheckbox ).not.toBeDisabled();
2321
} );
2422

25-
test( 'Respects constants', async ( { page, requestUtils } ) => {
23+
test( 'Respects constants', async ( { admin, page, requestUtils } ) => {
2624
await requestUtils.activatePlugin(
2725
'wp-bootstrap-blocks-test-css-grid'
2826
);
2927

28+
await admin.visitAdminPage(
29+
'options-general.php?page=wp-bootstrap-blocks_settings'
30+
);
31+
3032
await expect(
3133
await page.locator( '#wp-bootstrap-blocks_bootstrap_version' )
3234
).toBeDisabled();

0 commit comments

Comments
 (0)