8
0
Эх сурвалжийг харах

Tests: changed Link tests to be more accurate and not base on default command state.

Szymon Cofalik 9 жил өмнө
parent
commit
a7432ef3a4

+ 5 - 3
packages/ckeditor5-link/tests/link.js

@@ -67,6 +67,7 @@ describe( 'Link', () => {
 			const model = linkButton.model;
 			const command = editor.commands.get( 'link' );
 
+			command.isEnabled = true;
 			expect( model.isEnabled ).to.be.true;
 
 			command.isEnabled = false;
@@ -127,10 +128,11 @@ describe( 'Link', () => {
 			const model = unlinkButton.model;
 			const command = editor.commands.get( 'unlink' );
 
-			expect( model.isEnabled ).to.false;
-
 			command.isEnabled = true;
-			expect( model.isEnabled ).to.true;
+			expect( model.isEnabled ).to.be.true;
+
+			command.isEnabled = false;
+			expect( model.isEnabled ).to.be.false;
 		} );
 
 		it( 'should execute unlink command on unlinkButton#model execute event', () => {