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) { ...@@ -104,6 +104,16 @@ module.exports = function Page(browser) {
}; };
// ----------------- page actions // ----------------- 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 () { this.clickMarkAllCompletedCheckBox = function () {
return this.getMarkAllCompletedCheckBox().then(function (checkbox) { return this.getMarkAllCompletedCheckBox().then(function (checkbox) {
......
...@@ -84,6 +84,7 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod ...@@ -84,6 +84,7 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
} else { } else {
test.beforeEach(function () { test.beforeEach(function () {
launchBrowser(); launchBrowser();
page.ensureAppIsVisible();
}); });
test.afterEach(function () { test.afterEach(function () {
closeBrowser(); 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