|
@@ -534,10 +534,15 @@ describe( 'Differ', () => {
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'on an element - only one of many attributes changes', () => {
|
|
it( 'on an element - only one of many attributes changes', () => {
|
|
|
- root.getChild( 0 ).setAttribute( 'otherAttr', true );
|
|
|
|
|
-
|
|
|
|
|
const range = Range.createFromParentsAndOffsets( root, 0, root.getChild( 0 ), 0 );
|
|
const range = Range.createFromParentsAndOffsets( root, 0, root.getChild( 0 ), 0 );
|
|
|
|
|
|
|
|
|
|
+ // Set an attribute on an element. It won't change afterwards.
|
|
|
|
|
+ attribute( range, 'otherAttr', null, true );
|
|
|
|
|
+
|
|
|
|
|
+ // "Flush" differ.
|
|
|
|
|
+ differ.getChanges();
|
|
|
|
|
+ differ.reset();
|
|
|
|
|
+
|
|
|
attribute( range, attributeKey, attributeOldValue, attributeNewValue );
|
|
attribute( range, attributeKey, attributeOldValue, attributeNewValue );
|
|
|
|
|
|
|
|
expectChanges( [
|
|
expectChanges( [
|