|
|
@@ -32,24 +32,24 @@ describe( 'table properties', () => {
|
|
|
|
|
|
describe( 'isEnabled', () => {
|
|
|
describe( 'collapsed selection', () => {
|
|
|
- it( 'should be false if selection does not have table cell', () => {
|
|
|
+ it( 'should be false if selection does not have table', () => {
|
|
|
setData( model, '<paragraph>foo[]</paragraph>' );
|
|
|
expect( command.isEnabled ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
- it( 'should be true is selection has table cell', () => {
|
|
|
+ it( 'should be true is selection has table', () => {
|
|
|
setData( model, modelTable( [ [ '[]foo' ] ] ) );
|
|
|
expect( command.isEnabled ).to.be.true;
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
describe( 'non-collapsed selection', () => {
|
|
|
- it( 'should be false if selection does not have table cell', () => {
|
|
|
+ it( 'should be false if selection does not have table', () => {
|
|
|
setData( model, '<paragraph>f[oo]</paragraph>' );
|
|
|
expect( command.isEnabled ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
- it( 'should be true is selection has table cell', () => {
|
|
|
+ it( 'should be true is selection has table', () => {
|
|
|
setData( model, modelTable( [ [ 'f[o]o' ] ] ) );
|
|
|
expect( command.isEnabled ).to.be.true;
|
|
|
} );
|
|
|
@@ -58,13 +58,13 @@ describe( 'table properties', () => {
|
|
|
|
|
|
describe( 'value', () => {
|
|
|
describe( 'collapsed selection', () => {
|
|
|
- it( 'should be undefined if selected table cell has no alignment property', () => {
|
|
|
+ it( 'should be undefined if selected table has no alignment property', () => {
|
|
|
setData( model, modelTable( [ [ '[]foo' ] ] ) );
|
|
|
|
|
|
expect( command.value ).to.be.undefined;
|
|
|
} );
|
|
|
|
|
|
- it( 'should be set if selected table cell has alignment property', () => {
|
|
|
+ it( 'should be set if selected table has alignment property', () => {
|
|
|
setData( model, modelTable( [ [ '[]foo' ] ], { alignment: 'center' } ) );
|
|
|
|
|
|
expect( command.value ).to.equal( 'center' );
|
|
|
@@ -72,13 +72,13 @@ describe( 'table properties', () => {
|
|
|
} );
|
|
|
|
|
|
describe( 'non-collapsed selection', () => {
|
|
|
- it( 'should be false if selection does not have table cell', () => {
|
|
|
+ it( 'should be false if selection does not have table', () => {
|
|
|
setData( model, '<paragraph>f[oo]</paragraph>' );
|
|
|
|
|
|
expect( command.value ).to.be.undefined;
|
|
|
} );
|
|
|
|
|
|
- it( 'should be true is selection has table cell', () => {
|
|
|
+ it( 'should be true is selection has table', () => {
|
|
|
setData( model, modelTable( [ [ 'f[o]o' ] ], { alignment: 'center' } ) );
|
|
|
|
|
|
expect( command.value ).to.equal( 'center' );
|
|
|
@@ -97,7 +97,7 @@ describe( 'table properties', () => {
|
|
|
} );
|
|
|
|
|
|
describe( 'collapsed selection', () => {
|
|
|
- it( 'should set selected table cell alignment to a passed value', () => {
|
|
|
+ it( 'should set selected table alignment to a passed value', () => {
|
|
|
setData( model, modelTable( [ [ 'foo[]' ] ] ) );
|
|
|
|
|
|
command.execute( { value: 'right' } );
|
|
|
@@ -105,7 +105,7 @@ describe( 'table properties', () => {
|
|
|
assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
|
|
|
} );
|
|
|
|
|
|
- it( 'should change selected table cell alignment to a passed value', () => {
|
|
|
+ it( 'should change selected table alignment to a passed value', () => {
|
|
|
setData( model, modelTable( [ [ '[]foo' ] ], { alignment: 'center' } ) );
|
|
|
|
|
|
command.execute( { value: 'right' } );
|
|
|
@@ -113,7 +113,7 @@ describe( 'table properties', () => {
|
|
|
assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
|
|
|
} );
|
|
|
|
|
|
- it( 'should remove alignment from a selected table cell if no value is passed', () => {
|
|
|
+ it( 'should remove alignment from a selected table if no value is passed', () => {
|
|
|
setData( model, modelTable( [ [ '[]foo' ] ], { alignment: 'center' } ) );
|
|
|
|
|
|
command.execute();
|
|
|
@@ -123,7 +123,7 @@ describe( 'table properties', () => {
|
|
|
} );
|
|
|
|
|
|
describe( 'non-collapsed selection', () => {
|
|
|
- it( 'should set selected table cell alignment to a passed value', () => {
|
|
|
+ it( 'should set selected table alignment to a passed value', () => {
|
|
|
setData( model, modelTable( [ [ '[foo]' ] ] ) );
|
|
|
|
|
|
command.execute( { value: 'right' } );
|
|
|
@@ -131,7 +131,7 @@ describe( 'table properties', () => {
|
|
|
assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
|
|
|
} );
|
|
|
|
|
|
- it( 'should change selected table cell alignment to a passed value', () => {
|
|
|
+ it( 'should change selected table alignment to a passed value', () => {
|
|
|
setData( model, modelTable( [ [ '[foo]' ] ] ) );
|
|
|
|
|
|
command.execute( { value: 'right' } );
|
|
|
@@ -139,7 +139,7 @@ describe( 'table properties', () => {
|
|
|
assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
|
|
|
} );
|
|
|
|
|
|
- it( 'should remove alignment from a selected table cell if no value is passed', () => {
|
|
|
+ it( 'should remove alignment from a selected table if no value is passed', () => {
|
|
|
setData( model, modelTable( [ [ '[foo]' ] ] ) );
|
|
|
|
|
|
command.execute();
|