|
|
@@ -367,21 +367,21 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
|
|
|
it( 'should decrease colspan of table cells from previous column', () => {
|
|
|
setData( model, modelTable( [
|
|
|
- [ { colspan: 4, contents: '00' }, '03' ],
|
|
|
- [ { colspan: 3, contents: '10' }, '13' ],
|
|
|
- [ { colspan: 2, contents: '20' }, '22[]', '23' ],
|
|
|
- [ '30', { colspan: 2, contents: '31' }, '33' ],
|
|
|
- [ '40', '41', '42', '43' ]
|
|
|
+ [ { colspan: 4, contents: '00' }, '04' ],
|
|
|
+ [ { colspan: 3, contents: '10' }, '14' ],
|
|
|
+ [ { colspan: 2, contents: '20' }, '22[]', '23', '24' ],
|
|
|
+ [ '30', { colspan: 2, contents: '31' }, '33', '34' ],
|
|
|
+ [ '40', '41', '42', '43', '44' ]
|
|
|
] ) );
|
|
|
|
|
|
command.execute();
|
|
|
|
|
|
assertEqualMarkup( getData( model ), modelTable( [
|
|
|
- [ { colspan: 3, contents: '00' }, '03' ],
|
|
|
- [ { colspan: 2, contents: '10' }, '13' ],
|
|
|
- [ { colspan: 2, contents: '20' }, '[]23' ],
|
|
|
- [ '30', '31', '33' ],
|
|
|
- [ '40', '41', '43' ]
|
|
|
+ [ { colspan: 3, contents: '00' }, '04' ],
|
|
|
+ [ { colspan: 2, contents: '10' }, '14' ],
|
|
|
+ [ { colspan: 2, contents: '20' }, '[]23', '24' ],
|
|
|
+ [ '30', '31', '33', '34' ],
|
|
|
+ [ '40', '41', '43', '44' ]
|
|
|
|
|
|
] ) );
|
|
|
} );
|
|
|
@@ -389,7 +389,7 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
it( 'should decrease colspan of cells that are on removed column', () => {
|
|
|
setData( model, modelTable( [
|
|
|
[ { colspan: 3, contents: '[]00' }, '03' ],
|
|
|
- [ { colspan: 2, contents: '10' }, '13' ],
|
|
|
+ [ { colspan: 2, contents: '10' }, '12', '13' ],
|
|
|
[ '20', '21', '22', '23' ]
|
|
|
] ) );
|
|
|
|
|
|
@@ -397,7 +397,7 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
|
|
|
assertEqualMarkup( getData( model ), modelTable( [
|
|
|
[ { colspan: 2, contents: '[]00' }, '03' ],
|
|
|
- [ '10', '13' ],
|
|
|
+ [ '10', '12', '13' ],
|
|
|
[ '21', '22', '23' ]
|
|
|
] ) );
|
|
|
} );
|
|
|
@@ -421,7 +421,7 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
it( 'should work property if the rowspan is in the first column (the other cell in row is selected)', () => {
|
|
|
setData( model, modelTable( [
|
|
|
[ { rowspan: 2, contents: '00' }, '[]01' ],
|
|
|
- [ '10' ]
|
|
|
+ [ '11' ]
|
|
|
] ) );
|
|
|
|
|
|
command.execute();
|
|
|
@@ -434,7 +434,7 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
it( 'should work property if the rowspan is in the first column (the cell in row below is selected)', () => {
|
|
|
setData( model, modelTable( [
|
|
|
[ { rowspan: 2, contents: '00' }, '01' ],
|
|
|
- [ '[]10' ]
|
|
|
+ [ '[]11' ]
|
|
|
] ) );
|
|
|
|
|
|
command.execute();
|
|
|
@@ -447,14 +447,14 @@ describe( 'RemoveColumnCommand', () => {
|
|
|
it( 'should work property if the rowspan is in the first column (the cell with rowspan is selected)', () => {
|
|
|
setData( model, modelTable( [
|
|
|
[ { rowspan: 2, contents: '00[]' }, '01' ],
|
|
|
- [ '10' ]
|
|
|
+ [ '11' ]
|
|
|
] ) );
|
|
|
|
|
|
command.execute();
|
|
|
|
|
|
assertEqualMarkup( getData( model ), modelTable( [
|
|
|
[ '[]01' ],
|
|
|
- [ '10' ]
|
|
|
+ [ '11' ]
|
|
|
] ) );
|
|
|
} );
|
|
|
|