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 (#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 <ramonopoly@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
4 people authored and gutenbergplugin committed Jun 28, 2024
1 parent e238081 commit c6bc947
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 c6bc947

Please sign in to comment.