mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Use enter key to open node property instead of double click
This commit is contained in:
parent
530bf22bd5
commit
214d788029
@ -18,21 +18,24 @@ function Node(id) {
|
|||||||
this.id = '//*[@id="' + id + '"]';
|
this.id = '//*[@id="' + id + '"]';
|
||||||
}
|
}
|
||||||
|
|
||||||
Node.prototype.edit = function() {
|
Node.prototype.edit = function () {
|
||||||
browser.clickWithWait(this.id);
|
browser.waitForVisible(this.id);
|
||||||
browser.clickWithWait(this.id);
|
browser.moveToObject(this.id);
|
||||||
|
browser.buttonDown();
|
||||||
|
browser.buttonUp();
|
||||||
|
browser.keys(['Enter']);
|
||||||
// Wait until an edit dialog opens.
|
// Wait until an edit dialog opens.
|
||||||
browser.waitForVisible('#node-dialog-ok', 10000);
|
browser.waitForVisible('#node-dialog-ok', 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
Node.prototype.clickOk = function() {
|
Node.prototype.clickOk = function () {
|
||||||
browser.clickWithWait('#node-dialog-ok');
|
browser.clickWithWait('#node-dialog-ok');
|
||||||
// Wait untile an edit dialog closes.
|
// Wait untile an edit dialog closes.
|
||||||
browser.waitForVisible('#node-dialog-ok', 10000, true);
|
browser.waitForVisible('#node-dialog-ok', 10000, true);
|
||||||
browser.pause(50);
|
browser.pause(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
Node.prototype.connect = function(targetNode) {
|
Node.prototype.connect = function (targetNode) {
|
||||||
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
|
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
|
||||||
var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
|
var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
|
||||||
browser.dragAndDrop(outputPort, inputPort)
|
browser.dragAndDrop(outputPort, inputPort)
|
||||||
|
Loading…
Reference in New Issue
Block a user