mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fixed the problems that were caused by timing issue
This commit is contained in:
@@ -28,8 +28,13 @@ functionNode.prototype.setFunction = function(func) {
|
||||
browser.click('#node-input-func-editor');
|
||||
browser.keys(['Control', 'Home', 'Control']);
|
||||
for (var i = 0; i < func.length; i++) {
|
||||
browser.keys([func.substr(i, 1)]);
|
||||
browser.keys([func.charAt(i)]);
|
||||
}
|
||||
// Delete the unnecessary code that ace editor does the autocompletion.
|
||||
browser.keys(['Control', 'Shift', 'End', 'Shift', 'Control']);
|
||||
browser.keys(['Delete']);
|
||||
// Need to wait until ace editor correctly checks the syntax.
|
||||
browser.pause(50);
|
||||
}
|
||||
|
||||
module.exports = functionNode;
|
||||
|
@@ -25,11 +25,11 @@ function templateNode(id) {
|
||||
util.inherits(templateNode, nodePage);
|
||||
|
||||
templateNode.prototype.setSyntax = function(syntax) {
|
||||
browser.selectByValue('#node-input-syntax', syntax);
|
||||
browser.selectWithWait('#node-input-syntax', syntax);
|
||||
}
|
||||
|
||||
templateNode.prototype.setFormat = function(format) {
|
||||
browser.selectByValue('#node-input-format', format);
|
||||
browser.selectWithWait('#node-input-format', format);
|
||||
}
|
||||
|
||||
templateNode.prototype.setTemplate = function(template) {
|
||||
|
@@ -25,7 +25,7 @@ function httpinNode(id) {
|
||||
util.inherits(httpinNode, nodePage);
|
||||
|
||||
httpinNode.prototype.setMethod = function(method) {
|
||||
browser.selectByValue('#node-input-method', method);
|
||||
browser.selectWithWait('#node-input-method', method);
|
||||
}
|
||||
|
||||
httpinNode.prototype.setUrl = function(url) {
|
||||
|
@@ -29,11 +29,11 @@ httpRequestNode.prototype.setUrl = function(url) {
|
||||
}
|
||||
|
||||
httpRequestNode.prototype.setMethod = function(method) {
|
||||
browser.selectByValue('#node-input-method', method);
|
||||
browser.selectWithWait('#node-input-method', method);
|
||||
}
|
||||
|
||||
httpRequestNode.prototype.setReturn = function(ret) {
|
||||
browser.selectByValue('#node-input-ret', ret);
|
||||
browser.selectWithWait('#node-input-ret', ret);
|
||||
}
|
||||
|
||||
module.exports = httpRequestNode;
|
||||
|
@@ -45,7 +45,7 @@ var ptType = {
|
||||
};
|
||||
|
||||
function setT(t, index) {
|
||||
browser.selectByValue('//*[@id="node-input-rule-container"]/li[' + index + ']/div/div[1]/select', t);
|
||||
browser.selectWithWait('//*[@id="node-input-rule-container"]/li[' + index + ']/div/div[1]/select', t);
|
||||
}
|
||||
|
||||
// It is better to create a function whose input value is the object type in the future,
|
||||
|
@@ -25,7 +25,7 @@ function rangeNode(id) {
|
||||
util.inherits(rangeNode, nodePage);
|
||||
|
||||
rangeNode.prototype.setAction = function(action) {
|
||||
browser.selectByValue('#node-input-action', action);
|
||||
browser.selectWithWait('#node-input-action', action);
|
||||
}
|
||||
|
||||
rangeNode.prototype.setRange = function(minin, maxin, minout, maxout) {
|
||||
|
Reference in New Issue
Block a user