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);
|
2014-08-06 03:07:46 +03:00
|
|
|
testButton.buttonText = 'Play';
|
|
|
|
el = testButton.createEl();
|
|
|
|
|
2014-08-06 03:33:21 +03:00
|
|
|
ok(el.innerHTML, 'Juego', 'translation was successful');
|
2014-08-06 03:07:46 +03:00
|
|
|
});
|