1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix ui tests for new css classes

This commit is contained in:
Nick O'Leary 2019-05-16 13:43:42 +01:00
parent 42ab6deff1
commit 094c92ed85
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
5 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
red-ui-clipboard-dialog-import-opt/** /**
* Copyright JS Foundation and other contributors, http://js.foundation * Copyright JS Foundation and other contributors, http://js.foundation
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -52,9 +52,9 @@ RED.debug = (function() {
'<span class="button-group"><a id="red-ui-sidebar-debug-open" class="red-ui-footer-button" href="#" data-i18n="[title]node-red:debug.sidebar.openWindow"><i class="fa fa-desktop"></i></a></span> ' + '<span class="button-group"><a id="red-ui-sidebar-debug-open" class="red-ui-footer-button" href="#" data-i18n="[title]node-red:debug.sidebar.openWindow"><i class="fa fa-desktop"></i></a></span> ' +
'</div>'); '</div>');
messageList = $('<div class="red-ui-debug-content debug-content-list"/>').appendTo(content); messageList = $('<div class="red-ui-debug-content red-ui-debug-content-list"/>').appendTo(content);
sbc = messageList[0]; sbc = messageList[0];
messageTable = $('<div class="red-ui-debug-content debug-content-table hide"/>').appendTo(content); messageTable = $('<div class="red-ui-debug-content red-ui-debug-content-table hide"/>').appendTo(content);
var filterDialog = $('<div class="red-ui-debug-filter-box hide">'+ var filterDialog = $('<div class="red-ui-debug-filter-box hide">'+
'<div class="red-ui-debug-filter-row">'+ '<div class="red-ui-debug-filter-row">'+

View File

@ -19,18 +19,18 @@ function open(retainMessage) {
if (!retainMessage) { if (!retainMessage) {
// Clear old messages // Clear old messages
browser.clickWithWait('//a[@id="debug-tab-clear"]'); browser.clickWithWait('//a[@id="red-ui-sidebar-debug-clear"]');
} }
} }
function getMessage(index) { function getMessage(index) {
index = index ? index : 1; 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); return browser.getTextWithWait(debugMessagePath);
} }
function clearMessage() { function clearMessage() {
browser.clickWithWait('//a[@id="debug-tab-clear"]'); browser.clickWithWait('//a[@id="red-ui-sidebar-debug-clear"]');
} }
module.exports = { module.exports = {

View File

@ -49,7 +49,7 @@ function addNode(type, x, y) {
browser.moveToObject("#red-ui-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(); browser.buttonUp();
// Last node is the one that has been created right now. // 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 nodeId = nodeElement.getAttribute('id');
var node = nodeFactory.create(type, nodeId); var node = nodeFactory.create(type, nodeId);
return node; return node;
@ -69,10 +69,10 @@ function deploy() {
resolve(); 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. // Need additional wait until buttons becomes clickable.
browser.pause(50); browser.pause(50);
} }

View File

@ -33,13 +33,13 @@ Node.prototype.clickOk = function() {
} }
Node.prototype.connect = function(targetNode) { Node.prototype.connect = function(targetNode) {
var outputPort = this.id + '/*[@class="port_output"]'; var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
var inputPort = targetNode.id + '/*[@class="port_input"]'; var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
browser.dragAndDrop(outputPort, inputPort) browser.dragAndDrop(outputPort, inputPort)
} }
Node.prototype.clickLeftButton = function() { 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; module.exports = Node;