浏览代码

Merge pull request #83 from ckeditor/t/ckeditor5-engine/1267

Internal: Align to changes made in DocumentSelection. See ckeditor/ckeditor5-engine#1343.
Szymon Cofalik 7 年之前
父节点
当前提交
24be0e9d25
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      packages/ckeditor5-undo/tests/undoediting-integration.js

+ 5 - 3
packages/ckeditor5-undo/tests/undoediting-integration.js

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