Commit 07353bcd authored by Sam Saccone's avatar Sam Saccone

🐐 Reduce clear complete flake

parent 87d177de
......@@ -94,7 +94,7 @@ module.exports = function Page(browser) {
};
this.tryGetClearCompleteButton = function () {
return this.tryFindByXpath(this.getCompletedButtonXpath());
return this.findByXpath(this.getCompletedButtonXpath());
};
this.tryGetToggleForItemAtIndex = function (index) {
......@@ -226,10 +226,7 @@ module.exports = function Page(browser) {
};
this.clickClearCompleteButton = function () {
return this.tryGetClearCompleteButton().then(function (elements) {
var button = elements[0];
button.click();
});
return this.tryGetClearCompleteButton().click();
};
this.enterItem = function (itemText) {
......
......@@ -35,7 +35,7 @@ function TestOperations(page) {
this.assertClearCompleteButtonIsVisible = function () {
page.tryGetClearCompleteButton().then(function (element) {
testIsVisible(element, 'clear completed items button');
testIsVisible([element], 'clear completed items button');
});
};
......@@ -47,11 +47,9 @@ function TestOperations(page) {
};
this.assertClearCompleteButtonText = function (buttonText) {
page.tryGetClearCompleteButton().then(function (elements) {
var button = elements[0];
button.getText().then(function (text) {
return page.tryGetClearCompleteButton()
.getText().then(function (text) {
assert.equal(buttonText, text);
});
});
};
......
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