-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only load Gutenberg Polyfill in Gutenberg pages (#6849)
- Loading branch information
1 parent
3122002
commit 6453eb5
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import '../support/bootstrap'; | ||
import { visitAdmin, newDesktopBrowserPage } from '../support/utils'; | ||
|
||
describe( 'classic editor', () => { | ||
beforeAll( async () => { | ||
await newDesktopBrowserPage(); | ||
await visitAdmin( 'post-new.php', 'classic-editor' ); | ||
} ); | ||
|
||
it( 'Should work properly', async () => { | ||
// Click visual editor | ||
await page.click( '#content-tmce' ); | ||
await page.click( '#content_ifr' ); | ||
|
||
// type some random text | ||
await page.keyboard.type( 'Typing in classic editor' ); | ||
|
||
// Swtich to HTML mode | ||
await page.click( '#content-html' ); | ||
|
||
const textEditorContent = await page.$eval( '.wp-editor-area', ( element ) => element.value ); | ||
expect( textEditorContent ).toEqual( 'Typing in classic editor' ); | ||
} ); | ||
} ); |