From b4549e558161d8b920d0806848c118418173496c Mon Sep 17 00:00:00 2001 From: Daniel Sami Date: Thu, 18 Oct 2018 14:38:10 -0400 Subject: [PATCH 1/2] added search for visualizer nodes --- awx/ui/test/e2e/tests/test-workflow-visualizer.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/awx/ui/test/e2e/tests/test-workflow-visualizer.js b/awx/ui/test/e2e/tests/test-workflow-visualizer.js index 5d6a3d570b..df894a3944 100644 --- a/awx/ui/test/e2e/tests/test-workflow-visualizer.js +++ b/awx/ui/test/e2e/tests/test-workflow-visualizer.js @@ -21,6 +21,12 @@ const nodeRemove = "//*[contains(@class, 'nodeRemoveCross')]"; // one of the jobs or projects or inventories const testActionsProject = "//td[contains(text(), 'test-actions-project')]"; const testActionsJob = "//td[contains(text(), 'test-actions-job')]"; +const testActionsProjectText = "test-actions-project"; +const testActionsJobText = "test-actions-job"; + +// search bar for visualizer templates +const jobSearchBar = "//*[contains(@id, 'workflow-jobs-list')]//input[contains(@class, 'SmartSearch-input')]"; +const projectSearchBar = "//*[contains(@id, 'workflow-project-sync-list')]//input[contains(@class, 'SmartSearch-input')]"; // dropdown bar which lets you select edge type const edgeTypeDropdownBar = "//span[contains(@id, 'select2-workflow_node_edge-container')]"; @@ -59,6 +65,9 @@ module.exports = { client .useXpath() .findThenClick(rootNode) + .clearValue(projectSearchBar) + .setValue(projectSearchBar, [testActionsProjectText, client.Keys.ENTER]) + .pause(1000) .findThenClick(testActionsProject) .findThenClick(edgeTypeDropdownBar) .waitForElementNotPresent(successDropdown) @@ -88,6 +97,9 @@ module.exports = { }) .pause(1000) .waitForElementNotVisible(spinny) + .clearValue(jobSearchBar) + .setValue(jobSearchBar, [testActionsJobText, client.Keys.ENTER]) + .pause(1000) .findThenClick(testActionsJob) .pause(1000) .waitForElementNotVisible(spinny) @@ -113,6 +125,9 @@ module.exports = { }) .pause(1000) .waitForElementNotVisible(spinny) + .clearValue(jobSearchBar) + .setValue(jobSearchBar, [testActionsJobText, client.Keys.ENTER]) + .pause(1000) .findThenClick(testActionsJob) .pause(1000) .waitForElementNotVisible(spinny) From fdedc472d1237bf40219db13bf72efe95331d587 Mon Sep 17 00:00:00 2001 From: Daniel Sami Date: Thu, 18 Oct 2018 15:06:37 -0400 Subject: [PATCH 2/2] lint fix --- awx/ui/test/e2e/tests/test-workflow-visualizer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/test/e2e/tests/test-workflow-visualizer.js b/awx/ui/test/e2e/tests/test-workflow-visualizer.js index df894a3944..4b0b502348 100644 --- a/awx/ui/test/e2e/tests/test-workflow-visualizer.js +++ b/awx/ui/test/e2e/tests/test-workflow-visualizer.js @@ -21,8 +21,8 @@ const nodeRemove = "//*[contains(@class, 'nodeRemoveCross')]"; // one of the jobs or projects or inventories const testActionsProject = "//td[contains(text(), 'test-actions-project')]"; const testActionsJob = "//td[contains(text(), 'test-actions-job')]"; -const testActionsProjectText = "test-actions-project"; -const testActionsJobText = "test-actions-job"; +const testActionsProjectText = 'test-actions-project'; +const testActionsJobText = 'test-actions-job'; // search bar for visualizer templates const jobSearchBar = "//*[contains(@id, 'workflow-jobs-list')]//input[contains(@class, 'SmartSearch-input')]";