Commit 0b3a583c authored by Arthur Verschaeve's avatar Arthur Verschaeve

Merge pull request #1303 from tastejs/sjs/fix-passing-tests

Fix passing tests
parents fd4d3b68 c065f5bf
......@@ -104,6 +104,16 @@ module.exports = function Page(browser) {
};
// ----------------- page actions
this.ensureAppIsVisible = function () {
return browser.findElements(webdriver.By.css('#todoapp'))
.then(function (elms) {
if (elms.length > 0) {
return true;
} else {
throw new Error('Unable to find application root, did you start your local server?');
}
});
};
this.clickMarkAllCompletedCheckBox = function () {
return this.getMarkAllCompletedCheckBox().then(function (checkbox) {
......
......@@ -84,6 +84,7 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
} else {
test.beforeEach(function () {
launchBrowser();
page.ensureAppIsVisible();
});
test.afterEach(function () {
closeBrowser();
......
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