From 9e0bff394e1853fe6a545c6601c6adec3882e21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krzto=C5=84?= Date: Thu, 31 Jan 2019 15:38:03 +0100 Subject: [PATCH] Tests: Adjustments to changes in `getData()`. --- tests/paragraph-intergration.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/paragraph-intergration.js b/tests/paragraph-intergration.js index e98ace0..7d1397e 100644 --- a/tests/paragraph-intergration.js +++ b/tests/paragraph-intergration.js @@ -148,7 +148,7 @@ describe( 'Paragraph feature – integration', () => { const doc = editor.model.document; const root = doc.getRoot(); - expect( editor.getData() ).to.equal( '

 

' ); + expect( editor.getData( { trim: 'none' } ) ).to.equal( '

 

' ); expect( editor.commands.get( 'undo' ).isEnabled ).to.be.false; editor.setData( '

Foobar.

' ); @@ -157,19 +157,19 @@ describe( 'Paragraph feature – integration', () => { writer.remove( root.getChild( 0 ) ); } ); - expect( editor.getData() ).to.equal( '

 

' ); + expect( editor.getData( { trim: 'none' } ) ).to.equal( '

 

' ); editor.execute( 'undo' ); - expect( editor.getData() ).to.equal( '

Foobar.

' ); + expect( editor.getData( { trim: 'none' } ) ).to.equal( '

Foobar.

' ); editor.execute( 'redo' ); - expect( editor.getData() ).to.equal( '

 

' ); + expect( editor.getData( { trim: 'none' } ) ).to.equal( '

 

' ); editor.execute( 'undo' ); - expect( editor.getData() ).to.equal( '

Foobar.

' ); + expect( editor.getData( { trim: 'none' } ) ).to.equal( '

Foobar.

' ); } ); } ); @@ -193,18 +193,18 @@ describe( 'Paragraph feature – integration', () => { writer.remove( otherRoot.getChild( 0 ) ); } ); - expect( editor.data.get( 'main' ) ).to.equal( '

 

' ); - expect( editor.data.get( 'otherRoot' ) ).to.equal( '

 

' ); + expect( editor.data.get( { rootName: 'main', trim: 'none' } ) ).to.equal( '

 

' ); + expect( editor.data.get( { rootName: 'otherRoot', trim: 'none' } ) ).to.equal( '

 

' ); editor.execute( 'undo' ); - expect( editor.data.get( 'main' ) ).to.equal( '

 

' ); - expect( editor.data.get( 'otherRoot' ) ).to.equal( '

Foobar.

' ); + expect( editor.data.get( { rootName: 'main', trim: 'none' } ) ).to.equal( '

 

' ); + expect( editor.data.get( { rootName: 'otherRoot', trim: 'none' } ) ).to.equal( '

Foobar.

' ); editor.execute( 'undo' ); - expect( editor.data.get( 'main' ) ).to.equal( '

Foobar.

' ); - expect( editor.data.get( 'otherRoot' ) ).to.equal( '

Foobar.

' ); + expect( editor.data.get( { rootName: 'main', trim: 'none' } ) ).to.equal( '

Foobar.

' ); + expect( editor.data.get( { rootName: 'otherRoot', trim: 'none' } ) ).to.equal( '

Foobar.

' ); } ); } ); } );