mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #2158 from node-red/statusbar
⚠️ Standardise CSS class names through-out the editor
This commit is contained in:
@@ -102,7 +102,7 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
browser.url(url);
|
||||
browser.waitForExist('#palette_node_inject');
|
||||
browser.waitForExist('#red-ui-palette-node_inject');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
throw err;
|
||||
|
@@ -19,18 +19,18 @@ function open(retainMessage) {
|
||||
|
||||
if (!retainMessage) {
|
||||
// Clear old messages
|
||||
browser.clickWithWait('//a[@id="debug-tab-clear"]');
|
||||
browser.clickWithWait('//a[@id="red-ui-sidebar-debug-clear"]');
|
||||
}
|
||||
}
|
||||
|
||||
function getMessage(index) {
|
||||
index = index ? index : 1;
|
||||
var debugMessagePath = '//div[@class="debug-content debug-content-list"]/div[contains(@class,"debug-message")][' + index + ']//span[contains(@class, "debug-message-type")]';
|
||||
var debugMessagePath = '//div[@class="red-ui-debug-content red-ui-debug-content-list"]/div[contains(@class,"red-ui-debug-msg")][' + index + ']//span[contains(@class, "red-ui-debug-msg-type")]';
|
||||
return browser.getTextWithWait(debugMessagePath);
|
||||
}
|
||||
|
||||
function clearMessage() {
|
||||
browser.clickWithWait('//a[@id="debug-tab-clear"]');
|
||||
browser.clickWithWait('//a[@id="red-ui-sidebar-debug-clear"]');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@@ -16,23 +16,23 @@
|
||||
|
||||
var idMap = {
|
||||
// input
|
||||
"inject": "#palette_node_inject",
|
||||
"httpin": "#palette_node_http_in",
|
||||
"mqttIn": "#palette_node_mqtt_in",
|
||||
"inject": "#red-ui-palette-node_inject",
|
||||
"httpin": "#red-ui-palette-node_http_in",
|
||||
"mqttIn": "#red-ui-palette-node_mqtt_in",
|
||||
// output
|
||||
"debug": "#palette_node_debug",
|
||||
"httpResponse": "#palette_node_http_response",
|
||||
"mqttOut": "#palette_node_mqtt_out",
|
||||
"debug": "#red-ui-palette-node_debug",
|
||||
"httpResponse": "#red-ui-palette-node_http_response",
|
||||
"mqttOut": "#red-ui-palette-node_mqtt_out",
|
||||
// function
|
||||
"function": "#palette_node_function",
|
||||
"template": "#palette_node_template",
|
||||
"change": "#palette_node_change",
|
||||
"range": "#palette_node_range",
|
||||
"httpRequest": "#palette_node_http_request",
|
||||
"html": "#palette_node_html",
|
||||
"json": "#palette_node_json",
|
||||
"function": "#red-ui-palette-node_function",
|
||||
"template": "#red-ui-palette-node_template",
|
||||
"change": "#red-ui-palette-node_change",
|
||||
"range": "#red-ui-palette-node_range",
|
||||
"httpRequest": "#red-ui-palette-node_http_request",
|
||||
"html": "#red-ui-palette-node_html",
|
||||
"json": "#red-ui-palette-node_json",
|
||||
// storage
|
||||
"filein": "#palette_node_file_in",
|
||||
"filein": "#red-ui-palette-node_file_in",
|
||||
};
|
||||
|
||||
function getId(type) {
|
||||
|
@@ -46,10 +46,10 @@ function addNode(type, x, y) {
|
||||
}
|
||||
browser.moveToObject(palette.getId(type));
|
||||
browser.buttonDown();
|
||||
browser.moveToObject("#palette-search", previousX + 300, previousY + 100); // adjust to the top-left corner of workspace.
|
||||
browser.moveToObject("#red-ui-palette-search", previousX + 300, previousY + 100); // adjust to the top-left corner of workspace.
|
||||
browser.buttonUp();
|
||||
// Last node is the one that has been created right now.
|
||||
var nodeElement = browser.elements('//*[@class="node nodegroup"][last()]');
|
||||
var nodeElement = browser.elements('//*[@class="red-ui-flow-node red-ui-flow-node-group"][last()]');
|
||||
var nodeId = nodeElement.getAttribute('id');
|
||||
var node = nodeFactory.create(type, nodeId);
|
||||
return node;
|
||||
@@ -69,10 +69,10 @@ function deploy() {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
browser.clickWithWait('#btn-deploy');
|
||||
browser.clickWithWait('#red-ui-header-button-deploy');
|
||||
});
|
||||
});
|
||||
browser.waitForText('#btn-deploy', 2000);
|
||||
browser.waitForText('#red-ui-header-button-deploy', 2000);
|
||||
// Need additional wait until buttons becomes clickable.
|
||||
browser.pause(50);
|
||||
}
|
||||
|
@@ -33,13 +33,13 @@ Node.prototype.clickOk = function() {
|
||||
}
|
||||
|
||||
Node.prototype.connect = function(targetNode) {
|
||||
var outputPort = this.id + '/*[@class="port_output"]';
|
||||
var inputPort = targetNode.id + '/*[@class="port_input"]';
|
||||
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
|
||||
var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
|
||||
browser.dragAndDrop(outputPort, inputPort)
|
||||
}
|
||||
|
||||
Node.prototype.clickLeftButton = function() {
|
||||
browser.clickWithWait(this.id + '/*[@class="node_button node_left_button"]');
|
||||
browser.clickWithWait(this.id + '/*[@class="red-ui-flow-node-button"]');
|
||||
}
|
||||
|
||||
module.exports = Node;
|
||||
|
Reference in New Issue
Block a user