Skip to content

Commit

Permalink
Update E2E test to reflect the changes in this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Aug 3, 2023
1 parent 8cfdc5c commit 7b34eba
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions test/e2e/specs/site-editor/user-global-styles-revisions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test.describe( 'Global styles revisions', () => {
await admin.visitSiteEditor();
} );

test( 'should display revisions UI when there is more than 1 revision', async ( {
test( 'should display revisions UI when there is 1 revision', async ( {
page,
editor,
userGlobalStylesRevisions,
Expand All @@ -39,19 +39,6 @@ test.describe( 'Global styles revisions', () => {
// Change a style and save it.
await page.getByRole( 'button', { name: 'Colors styles' } ).click();

await page
.getByRole( 'button', { name: 'Color Background styles' } )
.click();
await page
.getByRole( 'button', { name: 'Color: Black' } )
.click( { force: true } );

await editor.saveSiteEditorEntities();

/*
* Change a style and save it again.
* We need more than 2 revisions to show the UI.
*/
await page
.getByRole( 'button', { name: 'Color Background styles' } )
.click();
Expand All @@ -70,7 +57,7 @@ test.describe( 'Global styles revisions', () => {

// There should be 2 revisions not including the reset to theme defaults button.
await expect( revisionButtons ).toHaveCount(
currentRevisions.length + 2
currentRevisions.length + 1
);
} );

Expand Down

0 comments on commit 7b34eba

Please sign in to comment.