Ver código fonte

Tests: Fixed several assertions to consider the initial state of ToggleAttributeCommand after refactoring. Closes #42.

Aleksander Nowodzinski 8 anos atrás
pai
commit
f26906817f

+ 3 - 3
packages/ckeditor5-basic-styles/tests/bold.js

@@ -65,13 +65,13 @@ describe( 'Bold', () => {
 
 		expect( boldView.isOn ).to.be.false;
 
-		expect( boldView.isEnabled ).to.be.true;
+		expect( boldView.isEnabled ).to.be.false;
 
 		command.value = true;
 		expect( boldView.isOn ).to.be.true;
 
-		command.isEnabled = false;
-		expect( boldView.isEnabled ).to.be.false;
+		command.isEnabled = true;
+		expect( boldView.isEnabled ).to.be.true;
 	} );
 
 	it( 'should set keystroke in the model', () => {

+ 3 - 3
packages/ckeditor5-basic-styles/tests/italic.js

@@ -65,13 +65,13 @@ describe( 'Italic', () => {
 
 		expect( italicView.isOn ).to.be.false;
 
-		expect( italicView.isEnabled ).to.be.true;
+		expect( italicView.isEnabled ).to.be.false;
 
 		command.value = true;
 		expect( italicView.isOn ).to.be.true;
 
-		command.isEnabled = false;
-		expect( italicView.isEnabled ).to.be.false;
+		command.isEnabled = true;
+		expect( italicView.isEnabled ).to.be.true;
 	} );
 
 	it( 'should set keystroke in the model', () => {