diff options
author | John McLear <john@mclear.co.uk> | 2013-03-06 15:02:05 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-06 15:02:05 +0000 |
commit | 60df48e48508d910f72c14a576c6c2b94e093163 (patch) | |
tree | ec276f1ba155ced445317bd74f7e01305789cb6f /tests | |
parent | 29d8482ce70299bd9d15be56982848d11f2e8e8a (diff) | |
download | etherpad-lite-60df48e48508d910f72c14a576c6c2b94e093163.zip |
ltr test and fix rtl test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/frontend/specs/language.js | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js index 86d2d740..ab7f2b3d 100644 --- a/tests/frontend/specs/language.js +++ b/tests/frontend/specs/language.js @@ -93,8 +93,9 @@ describe("Language select and change", function(){ //select arabic $languageoption.attr('selected','selected'); - $language.change(); - + $language.val("ar"); + $languageoption.change(); + helper.waitFor(function() { return chrome$("html")[0]["dir"] != 'ltr'; }) @@ -104,5 +105,32 @@ describe("Language select and change", function(){ done(); }); }); - + + it("changes direction when picking an ltr 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=en]"); + + //select english + //select arabic + $languageoption.attr('selected','selected'); + $language.val("en"); + $languageoption.change(); + + helper.waitFor(function() { + return chrome$("html")[0]["dir"] != 'rtl'; + }) + .done(function(){ + // check if the document's direction was changed + expect(chrome$("html")[0]["dir"]).to.be("ltr"); + done(); + }); + }); }); |