Add rtl frontend test

This commit is contained in:
Marcel Klehr 2012-12-23 17:07:26 +01:00
parent fefbdb6fe1
commit f830602cb2
1 changed files with 27 additions and 1 deletions

View File

@ -31,7 +31,7 @@ describe("Language select and change", function(){
$language.change();
helper.waitFor(function() {
return chrome$(".buttonicon-bold").parent()[0]["title"] = "Fett (Strg-B)";
return chrome$(".buttonicon-bold").parent()[0]["title"] == "Fett (Strg-B)";
})
.done(function(){
//get the value of the bold button
@ -80,5 +80,31 @@ describe("Language select and change", function(){
});
});
it("changes direction when picking an rtl lang", function(done) {
var inner$ = helper.padInner$;
var chrome$ = helper.padChrome$;
//click on the settings button to make settings visible
var $settingsButton = chrome$(".buttonicon-settings");
$settingsButton.click();
//click the language button
var $language = chrome$("#languagemenu");
var $languageoption = $language.find("[value=ar]");
//select arabic
$languageoption.attr('selected','selected');
$language.change();
helper.waitFor(function() {
return chrome$("html")[0]["dir"] != 'ltr';
})
.done(function(){
// check if the document's direction was changed
expect(chrome$("html")[0]["dir"]).to.be("rtl");
done();
});
});
});