Skip to content

Commit 38c87e2

Browse files
committed
chore: stabilize site editor widget e2e tests
1 parent b6a551f commit 38c87e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/e2e/wb-form-field-site-editor.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ test(
126126

127127
await iconOption.click( { force: true } );
128128

129-
// Confirm icon has been set.
130-
const icon = iconFieldSelector.locator( '.siteorigin-widget-icon span' );
131-
await expect( icon ).toHaveClass( /sow-icon-materialicons/ );
129+
// Confirm icon has been set by checking the stored value.
130+
const iconValue = iconField.locator( '.siteorigin-widget-input' );
131+
await expect( iconValue ).toHaveValue( /materialicons-sowm-regular-add_home/ );
132132

133133
// Validate Color field works as expected.
134134
const colorField = widget.locator( '.siteorigin-widget-field-type-color' );
@@ -197,6 +197,7 @@ test(
197197

198198
const visualModeButton = tinymceField.locator( '.wp-editor-tabs .switch-tmce' );
199199
const textModeButton = tinymceField.locator( '.wp-editor-tabs .switch-html' );
200+
await textModeButton.waitFor( { state: 'visible' } );
200201
await ensureElementVisible( textModeButton, offset );
201202
await ensureElementVisible( visualModeButton, offset );
202203

@@ -289,7 +290,8 @@ test(
289290
// The importer is now running. Wait for the transfer to finish.
290291
await waitForRequestToFinish(
291292
page,
292-
'so_widgets_image_import'
293+
'so_widgets_image_import',
294+
45000
293295
);
294296

295297
// Ensure modal has closed.

0 commit comments

Comments
 (0)