From f573cf47ed754553b63cf00c2b44d72f582e0ed8 Mon Sep 17 00:00:00 2001 From: Isaac Murchie Date: Fri, 19 Feb 2016 14:57:01 -0800 Subject: [PATCH] Make sure if the language is french we use the correct expected values --- test/functional/android/toggle/toggle-base.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/functional/android/toggle/toggle-base.js b/test/functional/android/toggle/toggle-base.js index 14c1fedc..51b917a0 100644 --- a/test/functional/android/toggle/toggle-base.js +++ b/test/functional/android/toggle/toggle-base.js @@ -6,14 +6,21 @@ exports.toggleTest = function (promisedBrowser, displayName, toggleElementName, var initialValue; it('should toggle ' + displayName, function (done) { + var on = 'ON'; + var off = 'OFF'; driver .elementByName(toggleElementName).text().then(function (txt) { initialValue = txt; + // make sure we have the right values + if (txt === 'OUI' || txt === 'NON') { + on = 'OUI'; + off = 'NON'; + } return driver[toggleMethod](); }) .then(function () { return driver.elementByName(toggleElementName).text().then(function (txt) { - txt.should.equal(initialValue === "ON" ? "OFF" : "ON"); + txt.should.equal(initialValue === on ? off : on); }); }) .nodeify(done);