ソースを参照

Tests: engine.treeModel.LivePosition 100% CC.

Szymon Cofalik 9 年 前
コミット
a9cfa71a59
1 ファイル変更13 行追加0 行削除
  1. 13 0
      packages/ckeditor5-engine/tests/treemodel/liveposition.js

+ 13 - 0
packages/ckeditor5-engine/tests/treemodel/liveposition.js

@@ -370,5 +370,18 @@ describe( 'LivePosition', () => {
 				expect( live.path ).to.deep.equal( path );
 			} );
 		} );
+
+		it( 'attributes changed', () => {
+			let changes = {
+				range: new Range( new Position( root, [ 1, 4, 0 ] ), new Position( root, [ 1, 4, 10 ] ) ),
+				key: 'foo',
+				oldValue: null,
+				newValue: 'bar'
+			};
+
+			doc.fire( 'change', 'setAttribute', changes, null );
+
+			expect( live.path ).to.deep.equal( path );
+		} );
 	} );
 } );