Procházet zdrojové kódy

Cleaned up button attribute definitions.

Aleksander Nowodzinski před 9 roky
rodič
revize
e121a4b81d

+ 0 - 2
packages/ckeditor5-basic-styles/src/bold.js

@@ -37,8 +37,6 @@ export default class Bold extends Feature {
 			const view = new ButtonView( locale );
 
 			view.set( {
-				isEnabled: true,
-				isOn: false,
 				label: t( 'Bold' ),
 				icon: 'bold',
 				keystroke

+ 0 - 2
packages/ckeditor5-basic-styles/src/italic.js

@@ -37,8 +37,6 @@ export default class Italic extends Feature {
 			const view = new ButtonView( locale );
 
 			view.set( {
-				isEnabled: true,
-				isOn: false,
 				label: t( 'Italic' ),
 				icon: 'italic',
 				keystroke

+ 4 - 0
packages/ckeditor5-basic-styles/tests/bold.js

@@ -45,6 +45,10 @@ describe( 'Bold', () => {
 
 	it( 'should register bold feature component', () => {
 		expect( boldView ).to.be.instanceOf( ButtonView );
+		expect( boldView.isOn ).to.be.false;
+		expect( boldView.label ).to.equal( 'Bold' );
+		expect( boldView.icon ).to.equal( 'bold' );
+		expect( boldView.keystroke ).to.equal( 'CTRL+B' );
 	} );
 
 	it( 'should execute bold command on model execute event', () => {

+ 4 - 0
packages/ckeditor5-basic-styles/tests/italic.js

@@ -45,6 +45,10 @@ describe( 'Italic', () => {
 
 	it( 'should register italic feature component', () => {
 		expect( italicView ).to.be.instanceOf( ButtonView );
+		expect( italicView.isOn ).to.be.false;
+		expect( italicView.label ).to.equal( 'Italic' );
+		expect( italicView.icon ).to.equal( 'italic' );
+		expect( italicView.keystroke ).to.equal( 'CTRL+I' );
 	} );
 
 	it( 'should execute italic command on model execute event', () => {