diff --git a/tests/undoediting-integration.js b/tests/undoediting-integration.js index 8bfec91..3c00f86 100644 --- a/tests/undoediting-integration.js +++ b/tests/undoediting-integration.js @@ -323,20 +323,22 @@ describe( 'UndoEditing integration', () => { writer.setAttribute( 'bold', true, doc.selection.getFirstRange() ); } ); output( 'fo[<$text bold="true">ob]ar' ); + expect( doc.selection.getAttribute( 'bold' ) ).to.be.true; model.change( writer => { setSelection( [ 0, 3 ], [ 0, 3 ] ); writer.insertText( 'zzz', doc.selection.getFirstPosition() ); } ); - output( 'fo<$text bold="true">ozzz<$text bold="true">[]bar' ); - expect( doc.selection.getAttribute( 'bold' ) ).to.true; + output( 'fo<$text bold="true">ozzz[]<$text bold="true">bar' ); + expect( doc.selection.getAttribute( 'bold' ) ).to.be.undefined; editor.execute( 'undo' ); output( 'fo<$text bold="true">o[]bar' ); - expect( doc.selection.getAttribute( 'bold' ) ).to.true; + expect( doc.selection.getAttribute( 'bold' ) ).to.be.true; editor.execute( 'undo' ); output( 'fo[ob]ar' ); + expect( doc.selection.getAttribute( 'bold' ) ).to.be.undefined; undoDisabled(); } );