summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-12-23 17:07:26 +0100
committerMarcel Klehr <mklehr@gmx.net>2012-12-23 18:17:27 +0100
commitf830602cb2414e6be3f682205fde8fe4cb289aeb (patch)
tree17530f147f3e258c64409d74932e79bc0eded1e4 /tests
parentfefbdb6fe1929f4e160d57a33b949e1aa5cb7b83 (diff)
downloadetherpad-lite-f830602cb2414e6be3f682205fde8fe4cb289aeb.zip
Add rtl frontend test
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/specs/language.js28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js
index 7d294282..e7705914 100644
--- a/tests/frontend/specs/language.js
+++ b/tests/frontend/specs/language.js
@@ -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();
+ });
+ });
});