Skip to content

Commit

Permalink
Added unit test for multilang support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Aug 31, 2017
1 parent 42d42d9 commit 45045c9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/plugins/a11yhelp/keystrokes.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,26 @@

assert.isTrue( CKEDITOR.tools.objectCompare( referenceKeyMap, keyMap ) );
} );
},

'test _keyMap supports multilang': function() {
var that = this;

this._createEditor( { language: 'en' }, function() {
var editor = this.editor,
keyMap;

keyMap = CKEDITOR.plugins.a11yhelp._createKeyMap( editor );

assert.areSame( 'Ctrl', keyMap[ CKEDITOR.CTRL ], 'Ctrl key label' );

// Test multilang support.
that._createEditor( { language: 'de' }, function() {
var germanKeyMap = CKEDITOR.plugins.a11yhelp._createKeyMap( that.editor );

assert.areSame( 'Strg', germanKeyMap[ CKEDITOR.CTRL ], 'Ctrl key label' );
} );
} );
}
} );
} )();

0 comments on commit 45045c9

Please sign in to comment.