|
|
@@ -465,7 +465,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the start position of the cell on the right when the direction is "right"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '[]01', '02' ],
|
|
|
@@ -475,7 +475,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the start position of the cell below when the direction is "down"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -485,7 +485,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should select a whole table when the direction is "up"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>[' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -495,7 +495,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should select a whole table when the direction is "left"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>[' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -513,7 +513,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position of the cell on the left when the direction is "left"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -523,7 +523,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position of the cell above when the direction is "up"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -533,7 +533,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should select a whole table when the direction is "down"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>[' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -543,7 +543,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should select a whole table when the direction is "right"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>[' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -561,7 +561,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to start position of the cell on the right when the direction is "right"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -571,7 +571,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position of the cell above when the direction is "up"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00[]', '01', '02' ],
|
|
|
@@ -581,7 +581,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the start position of the cell below when the direction is "down"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -591,7 +591,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position of the last cell in the previous row when the direction is "left"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02[]' ],
|
|
|
@@ -609,7 +609,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position of the cell on the left when the direction is "left"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -619,7 +619,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the end position the cell above when the direction is "up"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02[]' ],
|
|
|
@@ -629,7 +629,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the start position of the cell below when the direction is "down"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -639,7 +639,7 @@ describe( 'TableNavigation', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should navigate to the start position of the first cell in the next row when the direction is "right"', () => {
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), '<paragraph>foo</paragraph>' + modelTable( [
|
|
|
[ '00', '01', '02' ],
|
|
|
@@ -676,7 +676,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-col-spanned cell when approaching from the upper-spanned row', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 0 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -690,7 +690,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-col-spanned cell when approaching from the lower-spanned row', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 2, 0 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -704,7 +704,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell when approaching from the other row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -718,7 +718,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the cell in the upper-spanned row when approaching from the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 2 ] ); // Cell 13.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -732,7 +732,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 0 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -746,7 +746,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate from the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'right', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'right' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -762,7 +762,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell when approaching from the upper-spanned row', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 3 ] ); // Cell 14.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -776,7 +776,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell when approaching from the lower-spanned row', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 2, 1 ] ); // Cell 24.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -790,7 +790,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell when approaching from the other row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 2 ] ); // Cell 13.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -804,7 +804,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the cell in the upper-spanned row when approaching from the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 1 ] ); // Cell 11.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -818,7 +818,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 2 ] ); // Cell 33.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -832,7 +832,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate from the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'left', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'left' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -848,7 +848,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-col-spanned cell when approaching from the first spanned column', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -862,7 +862,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-col-spanned cell when approaching from the last spanned column', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 0, 2 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -876,7 +876,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell when approaching from the other col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -890,7 +890,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the cell in the first spanned column when approaching from the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 1 ] ); // Cell 11.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -904,7 +904,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 0, 3 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -918,7 +918,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate from the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 2 ] ); // Cell 13.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'down', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'down' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -934,7 +934,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the col-spanned cell when approaching from the first spanned column', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 4, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -948,7 +948,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the col-spanned cell when approaching from the last spanned column', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 4, 2 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -962,7 +962,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-col-spanned cell when approaching from the other col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -976,7 +976,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the cell in the first spanned column when approaching from the col-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 1 ] );
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01[]', '02', '03', '04' ],
|
|
|
@@ -990,7 +990,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate to the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 3, 2 ] ); // Cell 33.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03', '04' ],
|
|
|
@@ -1004,7 +1004,7 @@ describe( 'TableNavigation', () => {
|
|
|
it( 'should navigate from the row-spanned cell', () => {
|
|
|
const tableCell = modelRoot.getNodeByPath( [ 0, 1, 2 ] ); // Cell 13.
|
|
|
|
|
|
- tableNavigation._navigateFromCellInDirection( tableCell, 'up', false );
|
|
|
+ tableNavigation._navigateFromCellInDirection( tableCell, 'up' );
|
|
|
|
|
|
assertEqualMarkup( getModelData( model ), modelTable( [
|
|
|
[ '00', '01', '02', '03[]', '04' ],
|