|
|
@@ -69,54 +69,30 @@ describe( 'AttributeCommand', () => {
|
|
|
expect( command.value ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
- it( 'is true when the first item that allows attribute has the attribute set - forward #1', () => {
|
|
|
+ it( 'is true when the first item that allows attribute has the attribute set #1', () => {
|
|
|
setData( model, '<p><$text bold="true">fo[o</$text></p><h1>b]ar</h1>' );
|
|
|
|
|
|
expect( command.value ).to.be.true;
|
|
|
} );
|
|
|
|
|
|
- it( 'is true when the first item that allows attribute has the attribute set - forward #2', () => {
|
|
|
+ it( 'is true when the first item that allows attribute has the attribute set #2', () => {
|
|
|
setData( model, '<h1>fo[o</h1><p><$text bold="true">f</$text>o]o</p>' );
|
|
|
|
|
|
expect( command.value ).to.be.true;
|
|
|
} );
|
|
|
|
|
|
- it( 'is false when the first item that allows attribute has not the attribute set - forward #1', () => {
|
|
|
+ it( 'is false when the first item that allows attribute has not the attribute set #1', () => {
|
|
|
setData( model, '<p>b[a<$text bold="true">r</$text></p><h1>fo]o</h1>' );
|
|
|
|
|
|
expect( command.value ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
- it( 'is false when the first item that allows attribute has not the attribute set - forward #2', () => {
|
|
|
+ it( 'is false when the first item that allows attribute has not the attribute set #2', () => {
|
|
|
setData( model, '<h1>fo[o</h1><p>b<$text bold="true">r</$text>r]</p>' );
|
|
|
|
|
|
expect( command.value ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
- it( 'is true when the first item that allows attribute has the attribute set - backward #1', () => {
|
|
|
- setData( model, '<h1>fo[o</h1><p>b<$text bold="true">ar]</$text></p>', { lastRangeBackward: true } );
|
|
|
-
|
|
|
- expect( command.value ).to.be.true;
|
|
|
- } );
|
|
|
-
|
|
|
- it( 'is true when the first item that allows attribute has the attribute set - backward #2', () => {
|
|
|
- setData( model, '<p>b[a<$text bold="true">r</$text></p><h1>fo]o</h1>', { lastRangeBackward: true } );
|
|
|
-
|
|
|
- expect( command.value ).to.be.true;
|
|
|
- } );
|
|
|
-
|
|
|
- it( 'is false when the first item that allows attribute has not the attribute set - backward #1', () => {
|
|
|
- setData( model, '<h1>fo[o</h1><p>b<$text bold="true">a</$text>r]</p>', { lastRangeBackward: true } );
|
|
|
-
|
|
|
- expect( command.value ).to.be.false;
|
|
|
- } );
|
|
|
-
|
|
|
- it( 'is false when the first item that allows attribute has not the attribute set - backward #2', () => {
|
|
|
- setData( model, '<p>f[<$text bold="true">o</$text>o</p><h1>ba]r</h1>', { lastRangeBackward: true } );
|
|
|
-
|
|
|
- expect( command.value ).to.be.false;
|
|
|
- } );
|
|
|
-
|
|
|
it( 'is true when the first item that allows attribute has the attribute set - object with nested editable', () => {
|
|
|
model.schema.register( 'caption', {
|
|
|
allowContentOf: '$block',
|