Commit 005b11da authored by Sam Saccone's avatar Sam Saccone

tests: Add retry logic when adding new items

parent 2c90d2d0
......@@ -230,9 +230,17 @@ module.exports = function Page(browser) {
};
this.enterItem = function (itemText) {
var textField = this.getItemInputField();
var self = this;
browser.wait(function () {
var textField = self.getItemInputField();
textField.sendKeys(itemText);
textField.sendKeys(webdriver.Key.ENTER);
return self.getVisibleLabelText()
.then(function (labels) {
return labels.indexOf(itemText.trim()) !== -1;
});
}, 5000);
};
this.toggleItemAtIndex = function (index) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment