зеркало из https://github.com/xamarin/appium.old.git
Merge pull request #6166 from appium/isaac-fr
Make sure if the language is french we use the correct expected values
This commit is contained in:
Коммит
c4004afc39
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче