Sfoglia il codice sorgente

Fix unit tests after priority changes.

Mateusz Samsel 6 anni fa
parent
commit
3b503b4f1c

+ 3 - 3
packages/ckeditor5-font/tests/fontfamily/utils.js

@@ -57,7 +57,7 @@ describe( 'FontFamily utils', () => {
 							styles: {
 								'font-family': 'Arial'
 							},
-							priority: 5
+							priority: 7
 						}
 					},
 					{
@@ -68,7 +68,7 @@ describe( 'FontFamily utils', () => {
 							styles: {
 								'font-family': '\'Comic Sans MS\', sans-serif'
 							},
-							priority: 5
+							priority: 7
 						}
 					},
 					{
@@ -79,7 +79,7 @@ describe( 'FontFamily utils', () => {
 							styles: {
 								'font-family': '\'Lucida Console\', \'Courier New\', Courier, monospace'
 							},
-							priority: 5
+							priority: 7
 						}
 					}
 				] );

+ 4 - 4
packages/ckeditor5-font/tests/fontsize/fontsizeui.js

@@ -203,11 +203,11 @@ describe( 'FontSizeUI', () => {
 			it( 'does not alter normalizeOptions() internals', () => {
 				const options = normalizeOptions( [ 'tiny', 'small', 'default', 'big', 'huge' ] );
 				expect( options ).to.deep.equal( [
-					{ title: 'Tiny', model: 'tiny', view: { name: 'span', classes: 'text-tiny', priority: 5 } },
-					{ title: 'Small', model: 'small', view: { name: 'span', classes: 'text-small', priority: 5 } },
+					{ title: 'Tiny', model: 'tiny', view: { name: 'span', classes: 'text-tiny', priority: 7 } },
+					{ title: 'Small', model: 'small', view: { name: 'span', classes: 'text-small', priority: 7 } },
 					{ title: 'Default', model: undefined },
-					{ title: 'Big', model: 'big', view: { name: 'span', classes: 'text-big', priority: 5 } },
-					{ title: 'Huge', model: 'huge', view: { name: 'span', classes: 'text-huge', priority: 5 } }
+					{ title: 'Big', model: 'big', view: { name: 'span', classes: 'text-big', priority: 7 } },
+					{ title: 'Huge', model: 'huge', view: { name: 'span', classes: 'text-huge', priority: 7 } }
 				] );
 			} );
 

+ 8 - 8
packages/ckeditor5-font/tests/fontsize/utils.js

@@ -28,11 +28,11 @@ describe( 'FontSizeEditing Utils', () => {
 		describe( 'named presets', () => {
 			it( 'should return defined presets', () => {
 				expect( normalizeOptions( [ 'tiny', 'small', 'default', 'big', 'huge' ] ) ).to.deep.equal( [
-					{ title: 'Tiny', model: 'tiny', view: { name: 'span', classes: 'text-tiny', priority: 5 } },
-					{ title: 'Small', model: 'small', view: { name: 'span', classes: 'text-small', priority: 5 } },
+					{ title: 'Tiny', model: 'tiny', view: { name: 'span', classes: 'text-tiny', priority: 7 } },
+					{ title: 'Small', model: 'small', view: { name: 'span', classes: 'text-small', priority: 7 } },
 					{ title: 'Default', model: undefined },
-					{ title: 'Big', model: 'big', view: { name: 'span', classes: 'text-big', priority: 5 } },
-					{ title: 'Huge', model: 'huge', view: { name: 'span', classes: 'text-huge', priority: 5 } }
+					{ title: 'Big', model: 'big', view: { name: 'span', classes: 'text-big', priority: 7 } },
+					{ title: 'Huge', model: 'huge', view: { name: 'span', classes: 'text-huge', priority: 7 } }
 				] );
 			} );
 		} );
@@ -40,11 +40,11 @@ describe( 'FontSizeEditing Utils', () => {
 		describe( 'numerical presets', () => {
 			it( 'should return generated presets', () => {
 				expect( normalizeOptions( [ '10', 12, 'default', '14.1', 18.3 ] ) ).to.deep.equal( [
-					{ title: '10', model: 10, view: { name: 'span', styles: { 'font-size': '10px' }, priority: 5 } },
-					{ title: '12', model: 12, view: { name: 'span', styles: { 'font-size': '12px' }, priority: 5 } },
+					{ title: '10', model: 10, view: { name: 'span', styles: { 'font-size': '10px' }, priority: 7 } },
+					{ title: '12', model: 12, view: { name: 'span', styles: { 'font-size': '12px' }, priority: 7 } },
 					{ title: 'Default', model: undefined },
-					{ title: '14.1', model: 14.1, view: { name: 'span', styles: { 'font-size': '14.1px' }, priority: 5 } },
-					{ title: '18.3', model: 18.3, view: { name: 'span', styles: { 'font-size': '18.3px' }, priority: 5 } }
+					{ title: '14.1', model: 14.1, view: { name: 'span', styles: { 'font-size': '14.1px' }, priority: 7 } },
+					{ title: '18.3', model: 18.3, view: { name: 'span', styles: { 'font-size': '18.3px' }, priority: 7 } }
 				] );
 			} );
 		} );

+ 5 - 10
packages/ckeditor5-font/tests/utils.js

@@ -49,8 +49,7 @@ describe( 'utils', () => {
 						name: 'span',
 						styles: {
 							color: 'black'
-						},
-						priority: 5
+						}
 					}
 				},
 				{
@@ -61,8 +60,7 @@ describe( 'utils', () => {
 						name: 'span',
 						styles: {
 							color: 'black'
-						},
-						priority: 5
+						}
 					}
 				},
 				{
@@ -73,8 +71,7 @@ describe( 'utils', () => {
 						name: 'span',
 						styles: {
 							color: 'black'
-						},
-						priority: 5
+						}
 					}
 				},
 				{
@@ -85,8 +82,7 @@ describe( 'utils', () => {
 						name: 'span',
 						styles: {
 							color: 'black'
-						},
-						priority: 5
+						}
 					}
 				},
 				{
@@ -97,8 +93,7 @@ describe( 'utils', () => {
 						name: 'span',
 						styles: {
 							color: 'black'
-						},
-						priority: 5
+						}
 					}
 				},
 			] );