2015-03-26 06:43:41 +02:00
|
|
|
import Button from '../../src/js/button.js';
|
|
|
|
import TestHelpers from './test-helpers.js';
|
2014-08-06 03:07:46 +03:00
|
|
|
|
2015-03-26 06:43:41 +02:00
|
|
|
q.module('Button');
|
2015-03-11 03:01:11 +02:00
|
|
|
|
2014-08-06 03:07:46 +03:00
|
|
|
test('should localize its text', function(){
|
|
|
|
expect(1);
|
|
|
|
|
|
|
|
var player, testButton, el;
|
|
|
|
|
2015-03-26 06:43:41 +02:00
|
|
|
player = TestHelpers.makePlayer({
|
2014-08-06 03:07:46 +03:00
|
|
|
'language': 'es',
|
|
|
|
'languages': {
|
|
|
|
'es': {
|
|
|
|
'Play': 'Juego'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-03-11 03:01:11 +02:00
|
|
|
testButton = new Button(player);
|
2015-05-30 00:56:45 +02:00
|
|
|
testButton.controlText_ = 'Play';
|
2014-08-06 03:07:46 +03:00
|
|
|
el = testButton.createEl();
|
|
|
|
|
2015-05-30 00:56:45 +02:00
|
|
|
ok(el.innerHTML.match('Juego'));
|
2014-08-06 03:07:46 +03:00
|
|
|
});
|