Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global styles revisions e2e: tidy up selectors to open revisions panel #57146

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions test/e2e/specs/site-editor/user-global-styles-revisions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 /,
Expand Down Expand Up @@ -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/,
Expand Down Expand Up @@ -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' )
Expand Down Expand Up @@ -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' } )
Expand Down
Loading