Commit ce92430e authored by Sam Saccone's avatar Sam Saccone

Merge pull request #1497 from tastejs/sjs/improve-memory-tests

Sjs/improve memory tests
parents c42699d6 75e4e25a
'use strict';
var drool = require('drool');
var frameworkPathLookup = require('./framework-path-lookup');
var argv = require('optimist').default('laxMode', false).default('browser', 'chrome').argv;
......@@ -18,7 +20,7 @@ function idApp() {
.thenCatch(function () { return false; });
}
function newTodoSelector(name) {
function newTodoSelector() {
return idApp().then(function (isId) {
if (isId) {
return '#new-todo';
......@@ -28,7 +30,7 @@ function newTodoSelector(name) {
});
}
function listSelector(name) {
function listSelector() {
return idApp().then(function (isId) {
if (isId) {
return '#todo-list li';
......@@ -46,6 +48,7 @@ list.forEach(function (framework) {
},
action: function (name) {
driver.wait(function () {
driver.sleep(500);
return driver.findElement(drool.webdriver.By.css(newTodoSelector(name)))
.sendKeys('find magical goats', drool.webdriver.Key.ENTER)
.thenCatch(function () {
......@@ -55,7 +58,7 @@ list.forEach(function (framework) {
return driver.findElement(drool.webdriver.By.css(listSelector(name))).isDisplayed()
.then(function () {
return true;
})
});
});
}, 10000);
......@@ -87,7 +90,7 @@ list.forEach(function (framework) {
}
}.bind(framework.name)
}, driver)
}, driver);
});
driver.quit();
......
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