Skip to content

Commit

Permalink
Add e2e test for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 16, 2019
1 parent 6013792 commit f94e0a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/e2e-tests/specs/undo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
selectBlockByClientId,
getAllBlocks,
saveDraft,
publishPost,
disableNavigationMode,
} from '@wordpress/e2e-test-utils';

Expand Down Expand Up @@ -118,6 +119,15 @@ describe( 'undo', () => {
expect( await getEditedPostContent() ).toBe( '' );
} );

it( 'should not create undo levels when publishing', async () => {
await clickBlockAppender();
await page.keyboard.type( '1' );
await publishPost();
await pressKeyWithModifier( 'primary', 'z' );

expect( await getEditedPostContent() ).toBe( '' );
} );

it( 'should immediately create an undo level on typing', async () => {
await clickBlockAppender();

Expand Down

0 comments on commit f94e0a8

Please sign in to comment.