mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Fix lang frontend test to 'waitFor' the 'localized' event
This commit is contained in:
parent
f20af4818c
commit
c1f9028d19
1 changed files with 12 additions and 14 deletions
|
@ -21,14 +21,13 @@ describe("Language select and change", function(){
|
|||
$languageoption.attr('selected','selected');
|
||||
$language.change();
|
||||
|
||||
helper.waitFor(function(){
|
||||
|
||||
var $boldButton = chrome$(".buttonicon-bold").parent();
|
||||
//get the title of the bold button
|
||||
var boldButtonTitle = $boldButton[0]["title"];
|
||||
return boldButtonTitle !== undefined;
|
||||
}).done(function(){
|
||||
var localizedEventFired = false;
|
||||
$(chrome$.window).bind('localized', function() {
|
||||
localizedEventFired = true;
|
||||
})
|
||||
|
||||
helper.waitFor(function() { return localizedEventFired;})
|
||||
.done(function(){
|
||||
//get the value of the bold button
|
||||
var $boldButton = chrome$(".buttonicon-bold").parent();
|
||||
|
||||
|
@ -38,7 +37,6 @@ describe("Language select and change", function(){
|
|||
//check if the language is now german
|
||||
expect(boldButtonTitle).to.be("Fett (Strg-B)");
|
||||
done();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -58,13 +56,13 @@ describe("Language select and change", function(){
|
|||
$languageoption.attr('selected','selected');
|
||||
$language.change();
|
||||
|
||||
helper.waitFor(function(){
|
||||
var localizedEventFired = false;
|
||||
$(chrome$.window).bind('localized', function() {
|
||||
localizedEventFired = true;
|
||||
})
|
||||
|
||||
var $boldButton = chrome$(".buttonicon-bold").parent();
|
||||
//get the title of the bold button
|
||||
var boldButtonTitle = $boldButton[0]["title"];
|
||||
return boldButtonTitle !== undefined;
|
||||
}).done(function(){
|
||||
helper.waitFor(function() { return localizedEventFired;})
|
||||
.done(function(){
|
||||
|
||||
//get the value of the bold button
|
||||
var $boldButton = chrome$(".buttonicon-bold").parent();
|
||||
|
|
Loading…
Reference in a new issue