diff --git a/src/ui/linkformview.js b/src/ui/linkformview.js index 9db9ae3..3ad5a82 100644 --- a/src/ui/linkformview.js +++ b/src/ui/linkformview.js @@ -199,6 +199,7 @@ export default class LinkFormView extends View { const labeledInput = new LabeledInputView( this.locale, InputTextView ); labeledInput.label = t( 'Link URL' ); + labeledInput.inputView.placeholder = t( 'http://example.com' ); return labeledInput; } diff --git a/tests/ui/linkformview.js b/tests/ui/linkformview.js index f9c6f75..b9bda07 100644 --- a/tests/ui/linkformview.js +++ b/tests/ui/linkformview.js @@ -18,7 +18,7 @@ describe( 'LinkFormView', () => { let view; beforeEach( () => { - view = new LinkFormView( { t: () => {} } ); + view = new LinkFormView( { t: ( val ) => val } ); return view.init(); } ); @@ -97,6 +97,12 @@ describe( 'LinkFormView', () => { expect( spy.calledOnce ).to.true; } ); + describe( 'url input view', () => { + it( 'has placeholder', () => { + expect( view.urlInputView.inputView.placeholder ).to.equal( 'http://example.com' ); + } ); + } ); + describe( 'template', () => { it( 'has url input view', () => { expect( view.template.children.get( 0 ) ).to.equal( view.urlInputView );