mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update UI tests for new editor css
This commit is contained in:
parent
ea0526f29a
commit
8cf5ec9e5a
@ -77,7 +77,6 @@ module.exports = {
|
||||
browser.call(function () {
|
||||
return new Promise(function(resolve, reject) {
|
||||
cleanup(flowFilename);
|
||||
app.use("/",express.static("public"));
|
||||
server = http.createServer(app);
|
||||
var settings = {
|
||||
httpAdminRoot: "/",
|
||||
@ -102,7 +101,7 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
browser.url(url);
|
||||
browser.waitForExist('#red-ui-palette-node_inject');
|
||||
browser.waitForExist(".red-ui-palette-node[data-palette-type='inject']")
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
throw err;
|
||||
|
@ -16,23 +16,23 @@
|
||||
|
||||
var idMap = {
|
||||
// input
|
||||
"inject": "#red-ui-palette-node_inject",
|
||||
"httpin": "#red-ui-palette-node_http_in",
|
||||
"mqttIn": "#red-ui-palette-node_mqtt_in",
|
||||
"inject": ".red-ui-palette-node[data-palette-type='inject']",
|
||||
"httpin": ".red-ui-palette-node[data-palette-type='http in']",
|
||||
"mqttIn": ".red-ui-palette-node[data-palette-type='mqtt in']",
|
||||
// output
|
||||
"debug": "#red-ui-palette-node_debug",
|
||||
"httpResponse": "#red-ui-palette-node_http_response",
|
||||
"mqttOut": "#red-ui-palette-node_mqtt_out",
|
||||
"debug": ".red-ui-palette-node[data-palette-type='debug']",
|
||||
"httpResponse": ".red-ui-palette-node[data-palette-type='http response']",
|
||||
"mqttOut": ".red-ui-palette-node[data-palette-type='mqtt out']",
|
||||
// function
|
||||
"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",
|
||||
"function": ".red-ui-palette-node[data-palette-type='function']",
|
||||
"template": ".red-ui-palette-node[data-palette-type='template']",
|
||||
"change": ".red-ui-palette-node[data-palette-type='change']",
|
||||
"range": ".red-ui-palette-node[data-palette-type='range']",
|
||||
"httpRequest": ".red-ui-palette-node[data-palette-type='http request']",
|
||||
"html": ".red-ui-palette-node[data-palette-type='html']",
|
||||
"json": ".red-ui-palette-node[data-palette-type='json']",
|
||||
// storage
|
||||
"filein": "#red-ui-palette-node_file_in",
|
||||
"filein": ".red-ui-palette-node[data-palette-type='file in']",
|
||||
};
|
||||
|
||||
function getId(type) {
|
||||
|
@ -49,14 +49,14 @@ function addNode(type, x, y) {
|
||||
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="red-ui-flow-node red-ui-flow-node-group"][last()]');
|
||||
var nodeElement = browser.elements('//*[contains(concat(" ", normalize-space(@class), " "), " red-ui-flow-node-group ")][last()]');
|
||||
var nodeId = nodeElement.getAttribute('id');
|
||||
var node = nodeFactory.create(type, nodeId);
|
||||
return node;
|
||||
}
|
||||
|
||||
function deleteAllNodes() {
|
||||
browser.click('.innerCanvas');
|
||||
browser.click('.red-ui-workspace-chart-event-layer');
|
||||
browser.keys(['Control', 'a', 'a', 'Control']); // call twice to release the keys.
|
||||
browser.keys(['Delete']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user