mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Added test cases of flow control on cookbook
This commit is contained in:
@@ -36,6 +36,13 @@ var payloadType = {
|
||||
"env": 9,
|
||||
};
|
||||
|
||||
var timeType = {
|
||||
"none": 1,
|
||||
"interval": 2,
|
||||
"intervalBetweenTimes": 3,
|
||||
"atASpecificTime": 4,
|
||||
};
|
||||
|
||||
injectNode.prototype.setPayload = function(type, value) {
|
||||
// Open a payload type list.
|
||||
browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-container")]');
|
||||
@@ -50,4 +57,17 @@ injectNode.prototype.setTopic = function(value) {
|
||||
browser.setValue('#node-input-topic', value);
|
||||
}
|
||||
|
||||
injectNode.prototype.setOnce = function(value) {
|
||||
browser.clickWithWait('#node-input-once');
|
||||
}
|
||||
|
||||
injectNode.prototype.setTimeType = function(type) {
|
||||
var timeTypeXPath = '//*[@id="inject-time-type-select"]/option[' + timeType[type] + ']';
|
||||
browser.clickWithWait(timeTypeXPath);
|
||||
}
|
||||
|
||||
injectNode.prototype.setRepeat = function(sec) {
|
||||
browser.setValue('#inject-time-interval-count', sec);
|
||||
}
|
||||
|
||||
module.exports = injectNode;
|
||||
|
Reference in New Issue
Block a user