Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
martnpaneq committed Dec 30, 2024
1 parent de14e29 commit e817e87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions packages/ckeditor5-emoji/tests/emojimention.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
} );
} );

Expand Down Expand Up @@ -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__:' );
} );
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-emoji/tests/emojipicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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( '<paragraph>😀[]</paragraph>' );
expect( getModelData( editor.model ) ).to.equal( '<paragraph>🙂[]</paragraph>' );
} );

it( 'should close the picker when clicking outside of it', async () => {
Expand Down

0 comments on commit e817e87

Please sign in to comment.