|
|
@@ -85,17 +85,21 @@ describe( 'LinkUI', () => {
|
|
|
expect( linkButton ).to.be.instanceOf( ButtonView );
|
|
|
} );
|
|
|
|
|
|
+ it( 'should be toggleable button', () => {
|
|
|
+ expect( linkButton.isToggleable ).to.be.true;
|
|
|
+ } );
|
|
|
+
|
|
|
it( 'should be bound to the link command', () => {
|
|
|
const command = editor.commands.get( 'link' );
|
|
|
|
|
|
command.isEnabled = true;
|
|
|
- command.value = true;
|
|
|
+ command.value = 'http://ckeditor.com';
|
|
|
|
|
|
expect( linkButton.isOn ).to.be.true;
|
|
|
expect( linkButton.isEnabled ).to.be.true;
|
|
|
|
|
|
command.isEnabled = false;
|
|
|
- command.value = false;
|
|
|
+ command.value = undefined;
|
|
|
|
|
|
expect( linkButton.isOn ).to.be.false;
|
|
|
expect( linkButton.isEnabled ).to.be.false;
|