|
@@ -105,7 +105,7 @@ describe( 'CKFinderCommand', () => {
|
|
|
expect( command.isEnabled ).to.be.false;
|
|
expect( command.isEnabled ).to.be.false;
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- it( 'should be true when imageInsert and link command are enabled', () => {
|
|
|
|
|
|
|
+ it( 'should be true when imageInsert or link command is enabled', () => {
|
|
|
setModelData( model, '<paragraph>[]</paragraph>' );
|
|
setModelData( model, '<paragraph>[]</paragraph>' );
|
|
|
const insertImage = editor.commands.get( 'imageInsert' );
|
|
const insertImage = editor.commands.get( 'imageInsert' );
|
|
|
const linkCommand = editor.commands.get( 'link' );
|
|
const linkCommand = editor.commands.get( 'link' );
|
|
@@ -116,11 +116,17 @@ describe( 'CKFinderCommand', () => {
|
|
|
command.refresh();
|
|
command.refresh();
|
|
|
expect( command.isEnabled ).to.be.false;
|
|
expect( command.isEnabled ).to.be.false;
|
|
|
|
|
|
|
|
- linkCommand.isEnabled = true;
|
|
|
|
|
|
|
+ linkCommand.isEnabled = false;
|
|
|
insertImage.isEnabled = true;
|
|
insertImage.isEnabled = true;
|
|
|
|
|
|
|
|
command.refresh();
|
|
command.refresh();
|
|
|
expect( command.isEnabled ).to.be.true;
|
|
expect( command.isEnabled ).to.be.true;
|
|
|
|
|
+
|
|
|
|
|
+ linkCommand.isEnabled = true;
|
|
|
|
|
+ insertImage.isEnabled = false;
|
|
|
|
|
+
|
|
|
|
|
+ command.refresh();
|
|
|
|
|
+ expect( command.isEnabled ).to.be.true;
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|