From e817e8783cc9bd699ca0f8f8ab184d8489821bd1 Mon Sep 17 00:00:00 2001 From: Marcin Panek Date: Mon, 30 Dec 2024 15:42:35 +0100 Subject: [PATCH] Fixed tests. --- packages/ckeditor5-emoji/tests/emojimention.js | 16 ++++++++-------- packages/ckeditor5-emoji/tests/emojipicker.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/ckeditor5-emoji/tests/emojimention.js b/packages/ckeditor5-emoji/tests/emojimention.js index 00e98dbf938..c90f2040cdd 100644 --- a/packages/ckeditor5-emoji/tests/emojimention.js +++ b/packages/ckeditor5-emoji/tests/emojimention.js @@ -288,11 +288,11 @@ describe( 'EmojiMention', () => { } ); it( 'should query single emoji properly properly', () => { - return queryEmoji( 'flag_poland' ).then( queryResult => { - expect( queryResult ).to.deep.equal( [ - { id: 'emoji:flag_poland:', text: '🇵🇱' }, - { id: 'emoji:__SHOW_ALL_EMOJI__:', text: 'flag_poland' } - ] ); + return queryEmoji( 'toothbrush' ).then( queryResult => { + expect( queryResult[ 0 ].id ).to.equal( 'emoji:toothbrush:' ); + expect( queryResult[ 0 ].text ).to.equal( '🪥' ); + expect( queryResult[ 1 ].id ).to.equal( 'emoji:__SHOW_ALL_EMOJI__:' ); + expect( queryResult[ 1 ].text ).to.equal( 'toothbrush' ); } ); } ); @@ -378,12 +378,12 @@ describe( 'EmojiMention', () => { it( 'should return emojis with the default skin tone when the skin tone is selected but the emoji does not have variants', () => { editor.plugins.get( EmojiPicker )._selectedSkinTone = 5; - return queryEmoji( 'flag_poland' ).then( queryResult => { + return queryEmoji( 'toothbrush' ).then( queryResult => { expect( queryResult.length ).to.equal( 2 ); expect( queryResult[ 0 ] ).to.deep.equal( { - id: 'emoji:flag_poland:', - text: '🇵🇱' + id: 'emoji:toothbrush:', + text: '🪥' } ); expect( queryResult[ 1 ].id ).to.equal( 'emoji:__SHOW_ALL_EMOJI__:' ); } ); diff --git a/packages/ckeditor5-emoji/tests/emojipicker.js b/packages/ckeditor5-emoji/tests/emojipicker.js index 8bc8d96e87b..473ef13f205 100644 --- a/packages/ckeditor5-emoji/tests/emojipicker.js +++ b/packages/ckeditor5-emoji/tests/emojipicker.js @@ -88,11 +88,11 @@ describe( 'EmojiPicker', () => { clickEmojiToolbarButton(); - const firstEmojiInGrid = document.querySelector( '.ck-emoji-grid__tiles > button' ); + const firstEmojiInGrid = document.querySelector( '.ck-emoji-grid__tiles [title="slightly smiling face"]' ); firstEmojiInGrid.click(); - expect( getModelData( editor.model ) ).to.equal( '😀[]' ); + expect( getModelData( editor.model ) ).to.equal( '🙂[]' ); } ); it( 'should close the picker when clicking outside of it', async () => {