|
|
@@ -13,6 +13,7 @@ import { add } from '@ckeditor/ckeditor5-utils/src/translation-service';
|
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
|
|
|
|
add( 'pl', {
|
|
|
+ 'Choose heading': 'Wybierz nagłówek',
|
|
|
'Paragraph': 'Akapit',
|
|
|
'Heading': 'Nagłówek',
|
|
|
'Heading 1': 'Nagłówek 1',
|
|
|
@@ -59,7 +60,7 @@ describe( 'Heading', () => {
|
|
|
expect( dropdown ).to.be.instanceOf( DropdownView );
|
|
|
expect( dropdown.buttonView.isEnabled ).to.be.true;
|
|
|
expect( dropdown.buttonView.isOn ).to.be.undefined;
|
|
|
- expect( dropdown.buttonView.label ).to.equal( 'Heading' );
|
|
|
+ expect( dropdown.buttonView.label ).to.equal( 'Choose heading' );
|
|
|
expect( dropdown.buttonView.tooltip ).to.equal( 'Heading' );
|
|
|
} );
|
|
|
|
|
|
@@ -84,6 +85,11 @@ describe( 'Heading', () => {
|
|
|
sinon.assert.calledOnce( focusSpy );
|
|
|
} );
|
|
|
|
|
|
+ it( 'should add custom CSS class to dropdown', () => {
|
|
|
+ const dropdown = editor.ui.componentFactory.create( 'headings' );
|
|
|
+ expect( dropdown.element.classList.contains( 'ck-heading-dropdown' ) ).to.be.true;
|
|
|
+ } );
|
|
|
+
|
|
|
describe( 'model to command binding', () => {
|
|
|
let commands;
|
|
|
|
|
|
@@ -111,7 +117,7 @@ describe( 'Heading', () => {
|
|
|
commands[ name ].value = false;
|
|
|
}
|
|
|
|
|
|
- expect( dropdown.buttonView.label ).to.equal( 'Heading' );
|
|
|
+ expect( dropdown.buttonView.label ).to.equal( 'Choose heading' );
|
|
|
|
|
|
commands.heading2.value = true;
|
|
|
expect( dropdown.buttonView.label ).to.equal( 'Heading 2' );
|
|
|
@@ -140,7 +146,8 @@ describe( 'Heading', () => {
|
|
|
it( 'works for the #buttonView', () => {
|
|
|
const buttonView = dropdown.buttonView;
|
|
|
|
|
|
- expect( buttonView.label ).to.equal( 'Nagłówek' );
|
|
|
+ expect( buttonView.label ).to.equal( 'Wybierz nagłówek' );
|
|
|
+ expect( buttonView.tooltip ).to.equal( 'Nagłówek' );
|
|
|
|
|
|
commands.paragraph.value = true;
|
|
|
expect( buttonView.label ).to.equal( 'Akapit' );
|