Skip to content

Commit

Permalink
Block styles variations E2E: wait for Save button before editing glob…
Browse files Browse the repository at this point in the history
…al styles (WordPress#62915)

* Add blockName to the overrides array so getBlockName() can be called in the useSelect store subscription callback

* Update e2e test to wait for save button between styles updates

* Revert selector name

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: andrewserong <[email protected]>
  • Loading branch information
4 people authored Jun 28, 2024
1 parent 6de2f42 commit 4cb5adf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/specs/site-editor/block-style-variations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,14 @@ test.describe( 'Block Style Variations', () => {
},
},
} );
// The save button has been re-enabled.

// Wait for the save button to be re-enabled.
await expect(
page
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', { name: 'Save' } )
).toBeEnabled();
).toBeVisible();

// Second revision (current).
await siteEditorBlockStyleVariations.saveRevision( stylesPostId, {
blocks: {
Expand Down

0 comments on commit 4cb5adf

Please sign in to comment.