Skip to content

Commit

Permalink
Enable the test before we run the E2E test
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed May 22, 2024
1 parent 50037a1 commit e738ee0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion test/e2e/specs/site-editor/zoom-out.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@ test.describe( 'Zoom Out', () => {
await requestUtils.activateTheme( 'emptytheme' );
} );

test.beforeEach( async ( { admin, editor } ) => {
test.beforeEach( async ( { admin, editor, page } ) => {
await admin.visitAdminPage( 'admin.php', 'page=gutenberg-experiments' );

const zoomedOutCheckbox = page.getByLabel(
'Enable zoomed out view when selecting a pattern category in the main inserter.'
);

await zoomedOutCheckbox.setChecked( true );
await expect( zoomedOutCheckbox ).toBeChecked();
await page.getByRole( 'button', { name: 'Save Changes' } ).click();

await admin.visitSiteEditor();
await editor.canvas.locator( 'body' ).click();
} );

test.afterEach( async ( { admin, page } ) => {
await admin.visitAdminPage( 'admin.php', 'page=gutenberg-experiments' );
const zoomedOutCheckbox = page.getByLabel(
'Enable zoomed out view when selecting a pattern category in the main inserter.'
);
await zoomedOutCheckbox.setChecked( false );
await expect( zoomedOutCheckbox ).not.toBeChecked();
await page.getByRole( 'button', { name: 'Save Changes' } ).click();
} );

test.afterAll( async ( { requestUtils } ) => {
await requestUtils.activateTheme( 'twentytwentyone' );
} );
Expand Down

0 comments on commit e738ee0

Please sign in to comment.