diff --git a/test/editor/pageobjects/workspace/debugTab_page.js b/test/editor/pageobjects/editor/debugTab_page.js similarity index 100% rename from test/editor/pageobjects/workspace/debugTab_page.js rename to test/editor/pageobjects/editor/debugTab_page.js diff --git a/test/editor/pageobjects/workspace/palette_page.js b/test/editor/pageobjects/editor/palette_page.js similarity index 100% rename from test/editor/pageobjects/workspace/palette_page.js rename to test/editor/pageobjects/editor/palette_page.js diff --git a/test/editor/pageobjects/workspace/workspace_page.js b/test/editor/pageobjects/editor/workspace_page.js similarity index 100% rename from test/editor/pageobjects/workspace/workspace_page.js rename to test/editor/pageobjects/editor/workspace_page.js diff --git a/test/editor/pageobjects/nodes/core/core/20-inject_page.js b/test/editor/pageobjects/nodes/core/core/20-inject_page.js index 70321e69e..82a4e6d6e 100644 --- a/test/editor/pageobjects/nodes/core/core/20-inject_page.js +++ b/test/editor/pageobjects/nodes/core/core/20-inject_page.js @@ -24,7 +24,7 @@ function injectNode(id) { util.inherits(injectNode, nodePage); -var payloadType = { +var payloadTypeList = { "flow": 1, "global": 2, "str": 3, @@ -36,54 +36,43 @@ var payloadType = { "env": 9, }; -var timeType = { +var repeatTypeList = { "none": 1, "interval": 2, "intervalBetweenTimes": 3, "atASpecificTime": 4, }; -var timeType = { - "none": 1, - "interval": 2, - "intervalBetweenTimes": 3, - "atASpecificTime": 4, -}; - -var timeType = { - "none": 1, - "interval": 2, - "intervalBetweenTimes": 3, - "atASpecificTime": 4, -}; - -injectNode.prototype.setPayload = function(type, value) { +injectNode.prototype.setPayload = function(payloadType, payload) { // Open a payload type list. browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-container")]'); // Select a payload type. - var payloadTypeXPath = '//*[@class="red-ui-typedInput-options"]/a[' + payloadType[type] + ']'; + var payloadTypeXPath = '//*[@class="red-ui-typedInput-options"]/a[' + payloadTypeList[payloadType] + ']'; browser.clickWithWait(payloadTypeXPath); - if (value) { + if (payload) { // Input a value. - browser.setValue('//*[@class="red-ui-typedInput-input"]/input', value); + browser.setValue('//*[@class="red-ui-typedInput-input"]/input', payload); } } -injectNode.prototype.setTopic = function(value) { - browser.setValue('#node-input-topic', value); +injectNode.prototype.setTopic = function(topic) { + browser.setValue('#node-input-topic', topic); } -injectNode.prototype.setOnce = function(value) { - browser.clickWithWait('#node-input-once'); +injectNode.prototype.setOnce = function(once) { + var isChecked = browser.isSelected('#node-input-once'); + if (isChecked !== once) { + 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(repeatType) { + var repeatTypeXPath = '//*[@id="inject-time-type-select"]/option[' + repeatTypeList[repeatType] + ']'; + browser.clickWithWait(repeatTypeXPath); } -injectNode.prototype.setRepeat = function(sec) { - browser.setValue('#inject-time-interval-count', sec); +injectNode.prototype.setRepeatInterval = function(repeat) { + browser.setValue('#inject-time-interval-count', repeat); } module.exports = injectNode; diff --git a/test/editor/pageobjects/nodes/core/core/58-debug_page.js b/test/editor/pageobjects/nodes/core/core/58-debug_page.js index b04e4a228..c8c1d8871 100644 --- a/test/editor/pageobjects/nodes/core/core/58-debug_page.js +++ b/test/editor/pageobjects/nodes/core/core/58-debug_page.js @@ -24,22 +24,20 @@ function debugNode(id) { util.inherits(debugNode, nodePage); -var target = { - "msg": 1, - "full": 2 -}; - -debugNode.prototype.setTarget = function(type, value) { +debugNode.prototype.setOutput = function(complete) { // Open a payload type list. browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-container")]/button'); - // Select a payload type. - var xPath = '/html/body/div[11]/a[' + target[type] + ']'; - browser.clickWithWait(xPath); - if (value) { + if (complete !== 'true') { + // Select the "msg" type. + browser.clickWithWait('/html/body/div[11]/a[1]'); + // Input the path in msg. browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-input")]/input'); browser.keys(['Control', 'a', 'Control']); browser.keys(['Delete']); - browser.setValue('//*[contains(@class, "red-ui-typedInput-input")]/input', value); + browser.setValue('//*[contains(@class, "red-ui-typedInput-input")]/input', complete); + } else { + // Select the "complete msg object" type. + browser.clickWithWait('/html/body/div[11]/a[2]'); } } diff --git a/test/editor/pageobjects/nodes/core/core/80-function_page.js b/test/editor/pageobjects/nodes/core/core/80-function_page.js index 1cd47f8b9..56082c8a6 100644 --- a/test/editor/pageobjects/nodes/core/core/80-function_page.js +++ b/test/editor/pageobjects/nodes/core/core/80-function_page.js @@ -24,11 +24,11 @@ function functionNode(id) { util.inherits(functionNode, nodePage); -functionNode.prototype.setCode = function(value) { +functionNode.prototype.setFunction = function(func) { browser.click('#node-input-func-editor'); browser.keys(['Control', 'Home', 'Control']); - for (var i=0; i