|
|
@@ -211,10 +211,26 @@ describe( 'transform', () => {
|
|
|
|
|
|
expectClients( '<blockQuote><div>Foo</div></blockQuote>' );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'the same text, then undo', () => {
|
|
|
+ john.setData( '<blockQuote><paragraph>[Foo]</paragraph></blockQuote>' );
|
|
|
+ kate.setData( '<blockQuote><paragraph>[Foo]</paragraph></blockQuote>' );
|
|
|
+
|
|
|
+ john.wrap( 'div' );
|
|
|
+ kate.unwrap();
|
|
|
+
|
|
|
+ syncClients();
|
|
|
+
|
|
|
+ kate.undo();
|
|
|
+
|
|
|
+ syncClients();
|
|
|
+
|
|
|
+ expectClients( '<blockQuote><paragraph><div>Foo</div></paragraph></blockQuote>' );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'by delete', () => {
|
|
|
- it( 'text in two elements', () => {
|
|
|
+ it( 'text in two elements #1', () => {
|
|
|
john.setData( '[<paragraph>Foo</paragraph>]<paragraph>Bar</paragraph>' );
|
|
|
kate.setData( '<paragraph>Fo[o</paragraph><paragraph>Ba]r</paragraph>' );
|
|
|
|
|
|
@@ -229,6 +245,18 @@ describe( 'transform', () => {
|
|
|
'</blockQuote>'
|
|
|
);
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'text in two elements #2', () => {
|
|
|
+ john.setData( '<paragraph>[Foo]</paragraph><paragraph>Bar</paragraph>' );
|
|
|
+ kate.setData( '<paragraph>Fo[o</paragraph><paragraph>Ba]r</paragraph>' );
|
|
|
+
|
|
|
+ john.wrap( 'div' );
|
|
|
+ kate.delete();
|
|
|
+
|
|
|
+ syncClients();
|
|
|
+
|
|
|
+ expectClients( '<paragraph><div>Fo</div>r</paragraph>' );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'by merge', () => {
|