Created
November 4, 2022 10:04
-
-
Save lauriii/3f5292b3f4a30623925ac3789d5b1de0 to your computer and use it in GitHub Desktop.
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
diff --git a/packages/ckeditor5-engine/tests/controller/datacontroller.js b/packages/ckeditor5-engine/tests/controller/datacontroller.js | |
index e57cb989f4..ab8e56b755 100644 | |
--- a/packages/ckeditor5-engine/tests/controller/datacontroller.js | |
+++ b/packages/ckeditor5-engine/tests/controller/datacontroller.js | |
@@ -1030,7 +1030,13 @@ describe( 'DataController', () => { | |
it( 'should allow nesting upcast conversion', () => { | |
const dataProcessor = data.processor; | |
+ model.schema.register( 'softBreak', { | |
+ allowWhere: '$text', | |
+ isInline: true | |
+ } ); | |
+ | |
upcastHelpers.elementToAttribute( { view: 'strong', model: 'bold' } ); | |
+ upcastHelpers.elementToElement( { model: 'softBreak', view: 'br' } ); | |
data.upcastDispatcher.on( 'element:div', ( evt, data, conversionApi ) => { | |
const viewItem = data.viewItem; | |
@@ -1074,10 +1080,10 @@ describe( 'DataController', () => { | |
conversionApi.updateConversionResult( container, data ); | |
} ); | |
- data.set( '<div data-caption="foo<strong>baz</strong>"> </div>' ); | |
+ data.set( '<div data-caption="foo<br><strong>baz</strong>"> </div>' ); | |
expect( getData( model, { withoutSelection: true } ) ).to.equal( | |
- '<container><caption>foo<$text bold="true">baz</$text></caption></container>' | |
+ '<container><caption>foo<softBreak></softBreak><$text bold="true">baz</$text></caption></container>' | |
); | |
} ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment