diff options
author | John McLear <john@mclear.co.uk> | 2013-03-06 15:17:39 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-06 15:17:39 +0000 |
commit | 844012864ff4a7ecb5b236983578d3e36b915304 (patch) | |
tree | cdb4ad8d5133162062718005b0092ae0880800f3 /tests/frontend | |
parent | cb2d148734a797636778d92237a736b659bae474 (diff) | |
parent | 0c9214bb27ae1f2367995ffd55381f5b64d73714 (diff) | |
download | etherpad-lite-844012864ff4a7ecb5b236983578d3e36b915304.zip |
Merge branch 'release/1.2.81'
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/specs/keystroke_chat.js | 8 | ||||
-rw-r--r-- | tests/frontend/specs/language.js | 34 |
2 files changed, 36 insertions, 6 deletions
diff --git a/tests/frontend/specs/keystroke_chat.js b/tests/frontend/specs/keystroke_chat.js index 060c5aa2..e4908728 100644 --- a/tests/frontend/specs/keystroke_chat.js +++ b/tests/frontend/specs/keystroke_chat.js @@ -30,8 +30,9 @@ describe("send chat message", function(){ var usernameValue = username.text(); var time = $firstChatMessage.children(".time"); var timeValue = time.text(); - var expectedStringIncludingUserNameAndTime = usernameValue + timeValue + " " + "JohnMcLear"; - expect(expectedStringIncludingUserNameAndTime).to.be($firstChatMessage.text()); + var discoveredValue = $firstChatMessage.text(); + var chatMsgExists = (discoveredValue.indexOf("JohnMcLear") !== -1); + expect(chatMsgExists).to.be(true); done(); }); @@ -61,6 +62,7 @@ describe("send chat message", function(){ expect(containsMessage).to.be(true); done(); }); - }); + }); + 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(); + }); + }); }); |