diff options
author | John McLear <john@mclear.co.uk> | 2012-11-21 18:14:05 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2012-11-21 18:14:05 +0000 |
commit | 122093904fb536b6fc4f1ee5c0ac726d176c8f1a (patch) | |
tree | df3a287b6b07a82443b3f7e1d4381aa030114f1b | |
parent | 34df9d651e49ecf15470b4b45b581386338f500a (diff) | |
download | etherpad-lite-122093904fb536b6fc4f1ee5c0ac726d176c8f1a.zip |
Actually fix the language tests...
-rw-r--r-- | tests/frontend/specs/language.js | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/tests/frontend/specs/language.js b/tests/frontend/specs/language.js index f93bc33d..87d04220 100644 --- a/tests/frontend/specs/language.js +++ b/tests/frontend/specs/language.js @@ -4,69 +4,67 @@ describe("Language select and change", function(){ helper.newPad(cb); this.timeout(60000); }); - + it("makes text german", 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=de]"); - + //select german $languageoption.attr('selected','selected'); $language.change(); - - var current = $language.val(); - helper.waitFor(function() { return $language.val() != current}) // GOT IT? + + helper.waitFor(function() { return $language.val() == "de"}) .done(function(){ //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); - + //get the title of the bold button var boldButtonTitle = $boldButton[0]["title"]; - + //check if the language is now german expect(boldButtonTitle).to.be("Fett (Strg-B)"); done(); }); }); - + it("makes text English", 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 german $languageoption.attr('selected','selected'); $language.change(); - - var current = $language.val(); - helper.waitFor(function() { return $language.val() != current}) + + helper.waitFor(function() { return $language.val() == "en";}) .done(function(){ - + //get the value of the bold button var $boldButton = chrome$(".buttonicon-bold").parent(); - + //get the title of the bold button var boldButtonTitle = $boldButton[0]["title"]; - + //check if the language is now English expect(boldButtonTitle).to.be("Bold (Ctrl-B)"); done(); - + }); }); - -}); + +});
\ No newline at end of file |