diff --git a/tests/linkengine.js b/tests/linkengine.js index 102395b..71173d9 100644 --- a/tests/linkengine.js +++ b/tests/linkengine.js @@ -32,6 +32,7 @@ describe( 'LinkEngine', () => { } ); it( 'should set proper schema rules', () => { + expect( doc.schema.check( { name: '$inline', attributes: [ 'linkHref' ], inside: '$root' } ) ).to.be.false; expect( doc.schema.check( { name: '$inline', attributes: [ 'linkHref' ], inside: '$block' } ) ).to.be.true; } ); @@ -62,6 +63,17 @@ describe( 'LinkEngine', () => { expect( editor.getData() ).to.equal( '

foobar

' ); } ); + + it( 'should be integrated with autoparagraphing', () => { + // Incorrect results because autoparagraphing works incorrectly (issue in paragraph). + // https://github.com/ckeditor/ckeditor5-paragraph/issues/10 + + editor.setData( 'foobar' ); + + expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( 'foobar' ); + + expect( editor.getData() ).to.equal( '

foobar

' ); + } ); } ); describe( 'editing pipeline conversion', () => {