-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TinyMCE: Remove container assignment hack (#8465)
- Loading branch information
Showing
3 changed files
with
36 additions
and
4 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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`adding blocks Should handle change in tag name gracefully 1`] = ` | ||
"<!-- wp:heading {\\"level\\":3} --> | ||
<h3></h3> | ||
<!-- /wp:heading -->" | ||
`; |
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,29 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import '../support/bootstrap'; | ||
import { | ||
newPost, | ||
newDesktopBrowserPage, | ||
getEditedPostContent, | ||
insertBlock, | ||
} from '../support/utils'; | ||
|
||
describe( 'adding blocks', () => { | ||
beforeEach( async () => { | ||
await newDesktopBrowserPage(); | ||
await newPost(); | ||
} ); | ||
|
||
it( 'Should handle change in tag name gracefully', async () => { | ||
// Regression test: The heading block changes the tag name of its | ||
// RichText element. Historically this has been prone to breakage, | ||
// specifically in destroying / reinitializing the TinyMCE instance. | ||
// | ||
// See: https://github.com/WordPress/gutenberg/issues/3091 | ||
await insertBlock( 'Heading' ); | ||
await page.click( '[aria-label="Heading 3"]' ); | ||
|
||
expect( await getEditedPostContent() ).toMatchSnapshot(); | ||
} ); | ||
} ); |