diff --git a/test/e2e/specs/site-editor/user-global-styles-revisions.spec.js b/test/e2e/specs/site-editor/user-global-styles-revisions.spec.js index a27bb28adbb911..8c37f6e48ac485 100644 --- a/test/e2e/specs/site-editor/user-global-styles-revisions.spec.js +++ b/test/e2e/specs/site-editor/user-global-styles-revisions.spec.js @@ -49,7 +49,7 @@ test.describe( 'Global styles revisions', () => { await editor.saveSiteEditorEntities(); // Now there should be enough revisions to show the revisions UI. - await userGlobalStylesRevisions.openRevisions(); + await page.getByRole( 'button', { name: 'Revisions' } ).click(); const revisionButtons = page.getByRole( 'button', { name: /^Changes saved by /, @@ -81,7 +81,7 @@ test.describe( 'Global styles revisions', () => { .getByRole( 'option', { name: 'Color: Luminous vivid amber' } ) .click( { force: true } ); - await userGlobalStylesRevisions.openRevisions(); + await page.getByRole( 'button', { name: 'Revisions' } ).click(); const unSavedButton = page.getByRole( 'button', { name: /^Unsaved changes/, @@ -117,7 +117,7 @@ test.describe( 'Global styles revisions', () => { } ) => { await editor.canvas.locator( 'body' ).click(); await userGlobalStylesRevisions.openStylesPanel(); - await userGlobalStylesRevisions.openRevisions(); + await page.getByRole( 'button', { name: 'Revisions' } ).click(); const lastRevisionButton = page .getByLabel( 'Global styles revisions' ) .getByRole( 'button' ) @@ -147,13 +147,6 @@ class UserGlobalStylesRevisions { return []; } - async openRevisions() { - await this.page - .getByRole( 'menubar', { name: 'Styles actions' } ) - .click(); - await this.page.getByRole( 'button', { name: 'Revisions' } ).click(); - } - async openStylesPanel() { await this.page .getByRole( 'region', { name: 'Editor top bar' } )