Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: added additional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Apr 14, 2017
1 parent 90c0506 commit ccd8284
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/linkengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
} );

Expand Down Expand Up @@ -62,6 +63,17 @@ describe( 'LinkEngine', () => {

expect( editor.getData() ).to.equal( '<p><a href="url">foo</a>bar</p>' );
} );

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( '<a href="url">foo</a>bar' );

expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<paragraph>foobar</paragraph>' );

expect( editor.getData() ).to.equal( '<p>foobar</p>' );
} );
} );

describe( 'editing pipeline conversion', () => {
Expand Down

0 comments on commit ccd8284

Please sign in to comment.