Merge pull request #1181 from marcelklehr/fix/lang-test-dont-use-setimeout
dont use setimeout for lang testspull/1182/head
commit
323517c6dc
|
@ -21,8 +21,13 @@ describe("Language select and change", function(){
|
|||
$languageoption.attr('selected','selected');
|
||||
$language.change();
|
||||
|
||||
setTimeout(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();
|
||||
|
||||
|
@ -32,8 +37,7 @@ describe("Language select and change", function(){
|
|||
//check if the language is now german
|
||||
expect(boldButtonTitle).to.be("Fett (Strg-B)");
|
||||
done();
|
||||
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
it("makes text English", function(done) {
|
||||
|
@ -52,7 +56,13 @@ describe("Language select and change", function(){
|
|||
$languageoption.attr('selected','selected');
|
||||
$language.change();
|
||||
|
||||
setTimeout(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();
|
||||
|
@ -64,7 +74,7 @@ describe("Language select and change", function(){
|
|||
expect(boldButtonTitle).to.be("Bold (Ctrl-B)");
|
||||
done();
|
||||
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue