Selaa lähdekoodia

Fixed complex copy-table fragment test (ascii-art should match test, renumbering cells).

Kuba Niegowski 5 vuotta sitten
vanhempi
commit
27330d9c33
1 muutettua tiedostoa jossa 16 lisäystä ja 16 poistoa
  1. 16 16
      packages/ckeditor5-table/tests/tableclipboard-copy-cut.js

+ 16 - 16
packages/ckeditor5-table/tests/tableclipboard-copy-cut.js

@@ -193,7 +193,7 @@ describe( 'table clipboard', () => {
 
 		it( 'should fix selected table to a selection rectangle (hardcore case)', () => {
 			// This test check how previous simple rules run together (mixed prepending and trimming).
-			// In the example below a selection is set from cell "32" to "88"
+			// In the example below a selection is set from cell "21" to "77"
 			//
 			//                    Input table:                                         Copied table:
 			//
@@ -201,29 +201,29 @@ describe( 'table clipboard', () => {
 			//   | 00 | 01 | 02 | 03 | 04      | 06 | 07 | 08 |
 			//   +----+----+    +----+         +----+----+----+
 			//   | 10 | 11 |    | 13 |         | 16 | 17 | 18 |
-			//   +----+----+    +----+         +----+----+----+             +----+----+----+---------+----+----+
-			//   | 20 | 21 |    | 23 |         | 26           |             | 21 |    | 23 |    |    | 26 |    |
+			//   +----+----+    +----+         +----+----+----+             +----+----+----+----+----+----+----+
+			//   | 20 | 21 |    | 23 |         | 26           |             | 21 |    | 23 |    |    | 26      |
 			//   +----+----+    +----+         +----+----+----+             +----+----+----+----+----+----+----+
 			//   | 30 | 31 |    | 33 |         | 36 | 37      |             | 31 |    | 33 |    |    | 36 | 37 |
 			//   +----+----+----+----+         +----+----+----+             +----+----+----+----+----+----+----+
 			//   | 40                |         | 46 | 47 | 48 |             |    |    |    |    |    | 46 | 47 |
 			//   +----+----+----+----+         +----+----+----+     ==>     +----+----+----+----+----+----+----+
 			//   | 50 | 51 | 52 | 53 |         | 56 | 57 | 58 |             | 51 | 52 | 53 |    |    | 56 | 57 |
-			//   +----+----+----+----+----+----+    +----+----+             +----+----+----+----+----+----+----+
-			//   | 60 | 61           | 64 | 65 |    | 67 | 68 |             | 61 |    |    | 64 | 65 |    | 67 |
-			//   +----+----+----+----+----+----+    +----+----+             +----+----+----+----+----+----+----+
+			//   +----+----+----+----+         +    +----+----+             +----+----+----+----+----+    +----+
+			//   | 60 | 61           |         |    | 67 | 68 |             | 61           |    |    |    | 67 |
+			//   +----+----+----+----+----+----+    +----+----+             +----+----+----+----+----+    +----+
 			//   | 70 | 71 | 72 | 73 | 74 | 75 |    | 77 | 78 |             | 71 | 72 | 73 | 74 | 75 |    | 77 |
 			//   +----+    +----+----+----+----+    +----+----+             +----+----+----+----+----+----+----+
 			//   | 80 |    | 82 | 83 | 84 | 85 |    | 87 | 88 |
 			//   +----+----+----+----+----+----+----+----+----+
 			//
 			setModelData( model, modelTable( [
-				[ '00', '01', { contents: '02', rowspan: 4 }, '03', { contents: '04', colspan: 2, rowspan: 7 }, '07', '07', '08' ],
-				[ '10', '11', '13', '17', '17', '18' ],
-				[ '20', '21', '23', { contents: '27', colspan: 3 } ],
-				[ '30', '31', '33', '37', { contents: '37', colspan: 2 } ],
-				[ { contents: '40', colspan: 4 }, '47', '47', '48' ],
-				[ '50', '51', '52', '53', { contents: '57', rowspan: 4 }, '57', '58' ],
+				[ '00', '01', { contents: '02', rowspan: 4 }, '03', { contents: '04', colspan: 2, rowspan: 7 }, '06', '07', '08' ],
+				[ '10', '11', '13', '16', '17', '18' ],
+				[ '20', '21', '23', { contents: '26', colspan: 3 } ],
+				[ '30', '31', '33', '36', { contents: '37', colspan: 2 } ],
+				[ { contents: '40', colspan: 4 }, '46', '47', '48' ],
+				[ '50', '51', '52', '53', { contents: '56', rowspan: 4 }, '57', '58' ],
 				[ '60', { contents: '61', colspan: 3 }, '67', '68' ],
 				[ '70', { contents: '71', rowspan: 2 }, '72', '73', '74', '75', '77', '78' ],
 				[ '80', '82', '83', '84', '85', '87', '88' ]
@@ -235,10 +235,10 @@ describe( 'table clipboard', () => {
 			);
 
 			assertClipboardContentOnMethod( 'copy', viewTable( [
-				[ '21', ' ', '23', ' ', ' ', { contents: '27', colspan: 2 } ],
-				[ '31', ' ', '33', ' ', ' ', '37', '37' ],
-				[ ' ', ' ', ' ', ' ', ' ', '47', '47' ],
-				[ '51', '52', '53', ' ', ' ', { contents: '57', rowspan: 3 }, '57' ],
+				[ '21', ' ', '23', ' ', ' ', { contents: '26', colspan: 2 } ],
+				[ '31', ' ', '33', ' ', ' ', '36', '37' ],
+				[ ' ', ' ', ' ', ' ', ' ', '46', '47' ],
+				[ '51', '52', '53', ' ', ' ', { contents: '56', rowspan: 3 }, '57' ],
 				[ { contents: '61', colspan: 3 }, ' ', ' ', '67' ],
 				[ '71', '72', '73', '74', '75', '77' ]
 			] ) );