|
|
@@ -811,6 +811,16 @@ describe( 'Writer', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
+ describe( 'setTextData()', () => {
|
|
|
+ it( 'should update the content for text node', () => {
|
|
|
+ const textNode = createText( 'foo' );
|
|
|
+
|
|
|
+ setTextData( 'bar', textNode );
|
|
|
+
|
|
|
+ expect( textNode.data ).to.equal( 'bar' );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
+
|
|
|
describe( 'setAttribute() / removeAttribute()', () => {
|
|
|
let root, spy;
|
|
|
|
|
|
@@ -2462,6 +2472,12 @@ describe( 'Writer', () => {
|
|
|
} );
|
|
|
}
|
|
|
|
|
|
+ function setTextData( value, textNode ) {
|
|
|
+ model.enqueueChange( batch, writer => {
|
|
|
+ writer.setTextData( value, textNode );
|
|
|
+ } );
|
|
|
+ }
|
|
|
+
|
|
|
function setAttribute( key, value, itemOrRange ) {
|
|
|
model.enqueueChange( batch, writer => {
|
|
|
writer.setAttribute( key, value, itemOrRange );
|