Add page objects for UI testing (#2501)

* Update page object of change node

* Support multiple node outputs in UI testing

* Add page object of switch node

* Add page objects of trigger and exec nodes

* Remove unnecessary code

* Update page object of trigger node to select time unit

* Add page objects of websocket nodes

* Support boolean as value in selectWithWait()

* Update page object of split node

* Merge page objects of mqtt nodes to make them same as original mqtt node file path
This commit is contained in:
Kazuhito Yokoi
2020-03-13 22:20:16 +09:00
committed by GitHub
parent 6a30f2cbc8
commit 421b5846f2
16 changed files with 558 additions and 83 deletions

View File

@@ -35,10 +35,11 @@ Node.prototype.clickOk = function () {
browser.pause(50);
}
Node.prototype.connect = function (targetNode) {
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
Node.prototype.connect = function (targetNode, port) {
port = port || 1;
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"][' + port + ']';
var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
browser.dragAndDrop(outputPort, inputPort)
browser.dragAndDrop(outputPort, inputPort);
}
Node.prototype.clickLeftButton = function () {