|
|
@@ -75,21 +75,21 @@ describe( 'ImageTextAlternative', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should set alt attribute value to textarea and select it', () => {
|
|
|
- const spy = sinon.spy( form.lebeledInput, 'select' );
|
|
|
+ const spy = sinon.spy( form.labeledInput, 'select' );
|
|
|
setData( editor.document, '[<image src="" alt="foo bar"></image>]' );
|
|
|
button.fire( 'execute' );
|
|
|
|
|
|
sinon.assert.calledOnce( spy );
|
|
|
- expect( plugin.form.lebeledInput.value ).equals( 'foo bar' );
|
|
|
+ expect( plugin.form.labeledInput.value ).equals( 'foo bar' );
|
|
|
} );
|
|
|
|
|
|
it( 'should set empty text to textarea and select it when there is no alt attribute', () => {
|
|
|
- const spy = sinon.spy( form.lebeledInput, 'select' );
|
|
|
+ const spy = sinon.spy( form.labeledInput, 'select' );
|
|
|
setData( editor.document, '[<image src=""></image>]' );
|
|
|
button.fire( 'execute' );
|
|
|
|
|
|
sinon.assert.calledOnce( spy );
|
|
|
- expect( plugin.form.lebeledInput.value ).equals( '' );
|
|
|
+ expect( plugin.form.labeledInput.value ).equals( '' );
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
@@ -99,17 +99,17 @@ describe( 'ImageTextAlternative', () => {
|
|
|
const button = editor.ui.componentFactory.create( 'imageTextAlternative' );
|
|
|
|
|
|
// Mock the value of the input after some past editing.
|
|
|
- form.lebeledInput.value = 'foo';
|
|
|
+ form.labeledInput.value = 'foo';
|
|
|
|
|
|
// Mock the user using the form, changing the value but clicking "Cancel".
|
|
|
// so the command's value is not updated.
|
|
|
- form.lebeledInput.inputView.element.value = 'This value was canceled.';
|
|
|
+ form.labeledInput.inputView.element.value = 'This value was canceled.';
|
|
|
|
|
|
// Mock the user editing the same image once again.
|
|
|
setData( editor.document, '[<image src="" alt="foo"></image>]' );
|
|
|
|
|
|
button.fire( 'execute' );
|
|
|
- expect( form.lebeledInput.inputView.element.value ).to.equal( 'foo' );
|
|
|
+ expect( form.labeledInput.inputView.element.value ).to.equal( 'foo' );
|
|
|
} );
|
|
|
|
|
|
it( 'should execute command on submit', () => {
|
|
|
@@ -117,7 +117,7 @@ describe( 'ImageTextAlternative', () => {
|
|
|
form.fire( 'submit' );
|
|
|
|
|
|
sinon.assert.calledOnce( spy );
|
|
|
- sinon.assert.calledWithExactly( spy, 'imageTextAlternative', { newValue: form.lebeledInput.inputView.element.value } );
|
|
|
+ sinon.assert.calledWithExactly( spy, 'imageTextAlternative', { newValue: form.labeledInput.inputView.element.value } );
|
|
|
} );
|
|
|
|
|
|
it( 'should detach panel on cancel', () => {
|