From 38ad1b94dccc93c4f6a200a274af67c44004b78b Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 18 Dec 2023 13:40:47 +1100 Subject: [PATCH 1/3] Since https://github.com/WordPress/gutenberg/pull/56454 the revisions button is no longer in the drop down actions list so we don't need to click it. --- .../e2e/specs/site-editor/user-global-styles-revisions.spec.js | 3 --- 1 file changed, 3 deletions(-) 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..a0c859303c29ac 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 @@ -148,9 +148,6 @@ class UserGlobalStylesRevisions { } async openRevisions() { - await this.page - .getByRole( 'menubar', { name: 'Styles actions' } ) - .click(); await this.page.getByRole( 'button', { name: 'Revisions' } ).click(); } From 3b95f94f6930dd022aeeada5f5a2205168e377d1 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 18 Dec 2023 13:49:17 +1100 Subject: [PATCH 2/3] delete openRevisions --- .../site-editor/user-global-styles-revisions.spec.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 a0c859303c29ac..7a7e060b596b47 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 this.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 this.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 this.page.getByRole( 'button', { name: 'Revisions' } ).click(); const lastRevisionButton = page .getByLabel( 'Global styles revisions' ) .getByRole( 'button' ) @@ -147,10 +147,6 @@ class UserGlobalStylesRevisions { return []; } - async openRevisions() { - await this.page.getByRole( 'button', { name: 'Revisions' } ).click(); - } - async openStylesPanel() { await this.page .getByRole( 'region', { name: 'Editor top bar' } ) From 4d926e7203cd64beff1398d86f88bffb704f26c0 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 18 Dec 2023 14:23:27 +1100 Subject: [PATCH 3/3] Whoops --- .../specs/site-editor/user-global-styles-revisions.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7a7e060b596b47..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 this.page.getByRole( 'button', { name: 'Revisions' } ).click(); + 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 this.page.getByRole( 'button', { name: 'Revisions' } ).click(); + 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 this.page.getByRole( 'button', { name: 'Revisions' } ).click(); + await page.getByRole( 'button', { name: 'Revisions' } ).click(); const lastRevisionButton = page .getByLabel( 'Global styles revisions' ) .getByRole( 'button' )