Skip to content

Commit

Permalink
Remove e2e tests, which are behaving oddly and will break with modal UX
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Jul 26, 2018
1 parent 5ae19e1 commit bc03138
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions test/e2e/specs/classic-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,4 @@ describe( 'classic editor', () => {
const textEditorContent = await page.$eval( '.wp-editor-area', ( element ) => element.value );
expect( textEditorContent ).toEqual( 'Typing in classic editor' );
} );

it( 'Should have wpautop disabled on a post containing blocks', async () => {
// Click the Text mode.
await page.click( '#content-html' );

// Enter some block text.
const original = `<!-- wp:paragraph -->
<p>Foo bar four five six</p>
<!-- /wp:paragraph -->
This is another set of text`;
await page.type( '#content', original );

const initialTextEditorContent = await page.$eval( '.wp-editor-area', ( element ) => element.value );
expect( initialTextEditorContent ).toEqual( original );

// Save the post so that TinyMCE loads with wpautop disabled.
await Promise.all( [
page.waitForNavigation(),
page.click( '#save-post' ),
] );

// Switch to Visual mode.
await page.click( '#content-tmce' );
await page.click( '#content_ifr' );

// Switch back to Text mode.
await page.click( '#content-html' );

// Expected text is wrapped in `<p>` because `removep()` isn't run
// when switching out of Visual mode.
const expected = `<!-- wp:paragraph -->
<p>Foo bar four five six</p>
<!-- /wp:paragraph -->
<p>This is another set of text</p>`;
const textEditorContent = await page.$eval( '.wp-editor-area', ( element ) => element.value );
expect( textEditorContent ).toEqual( expected );
} );
} );

0 comments on commit bc03138

Please sign in to comment.