From 094c92ed8574a47bccb92e6bcaf7994deac5bd3d Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 16 May 2019 13:43:42 +0100 Subject: [PATCH] Fix ui tests for new css classes --- .../@node-red/editor-client/src/js/ui/clipboard.js | 2 +- .../@node-red/nodes/core/core/lib/debug/debug-utils.js | 4 ++-- test/editor/pageobjects/editor/debugTab_page.js | 6 +++--- test/editor/pageobjects/editor/workspace_page.js | 6 +++--- test/editor/pageobjects/nodes/node_page.js | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js index f1e3cc517..d6678404d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js @@ -1,4 +1,4 @@ -red-ui-clipboard-dialog-import-opt/** +/** * Copyright JS Foundation and other contributors, http://js.foundation * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/node_modules/@node-red/nodes/core/core/lib/debug/debug-utils.js b/packages/node_modules/@node-red/nodes/core/core/lib/debug/debug-utils.js index ded828ea5..953ca7f37 100644 --- a/packages/node_modules/@node-red/nodes/core/core/lib/debug/debug-utils.js +++ b/packages/node_modules/@node-red/nodes/core/core/lib/debug/debug-utils.js @@ -52,9 +52,9 @@ RED.debug = (function() { ' ' + ''); - messageList = $('
').appendTo(content); + messageList = $('
').appendTo(content); sbc = messageList[0]; - messageTable = $('
').appendTo(content); + messageTable = $('
').appendTo(content); var filterDialog = $('
'+ '
'+ diff --git a/test/editor/pageobjects/editor/debugTab_page.js b/test/editor/pageobjects/editor/debugTab_page.js index 99905c9cd..5476a28d6 100644 --- a/test/editor/pageobjects/editor/debugTab_page.js +++ b/test/editor/pageobjects/editor/debugTab_page.js @@ -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 = { diff --git a/test/editor/pageobjects/editor/workspace_page.js b/test/editor/pageobjects/editor/workspace_page.js index d47ed7b2c..0706da610 100644 --- a/test/editor/pageobjects/editor/workspace_page.js +++ b/test/editor/pageobjects/editor/workspace_page.js @@ -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.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); } diff --git a/test/editor/pageobjects/nodes/node_page.js b/test/editor/pageobjects/nodes/node_page.js index fc16c873a..a093a2335 100644 --- a/test/editor/pageobjects/nodes/node_page.js +++ b/test/editor/pageobjects/nodes/node_page.js @@ -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;