From e50dd9242556a229a21a624a1c7bb01c994530f9 Mon Sep 17 00:00:00 2001 From: John Hill Date: Thu, 29 Nov 2018 18:16:53 -0500 Subject: [PATCH 1/3] Cannot depend on the id and order, reverting to workflow node names --- .../test/e2e/tests/test-templates-list-actions.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/awx/ui/test/e2e/tests/test-templates-list-actions.js b/awx/ui/test/e2e/tests/test-templates-list-actions.js index d1e727e2b8..0ffba23a1b 100644 --- a/awx/ui/test/e2e/tests/test-templates-list-actions.js +++ b/awx/ui/test/e2e/tests/test-templates-list-actions.js @@ -176,16 +176,11 @@ module.exports = { client.expect.element('#node-1 text').text.not.equal('').after(5000); client.expect.element('#node-2 text').text.not.equal('').after(5000); client.expect.element('#node-3 text').text.not.equal('').after(5000); - client.expect.element('#node-4 text').text.not.equal('').after(5000); + client.expect.element('#node-4 text').text.not.equal('').after(5000); - const checkNodeText = (selector, text) => client.getText(selector, ({ value }) => { - client.assert.equal(text.indexOf(value.replace('...', '')) >= 0, true); - }); - - checkNodeText('#node-1 text', 'START'); - checkNodeText('#node-3 text', data.project.name); - checkNodeText('#node-4 text', data.template.name); - checkNodeText('#node-2 text', data.source.name); + client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..'); + client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-project")]/..'); + client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-inventory")]/..'); templates.expect.element('@save').visible; templates.expect.element('@save').enabled; From 6205a5db83a59a9090efb4c91ddc034e324323af Mon Sep 17 00:00:00 2001 From: John Hill Date: Thu, 29 Nov 2018 19:11:27 -0500 Subject: [PATCH 2/3] Updating to fix linting error --- awx/ui/test/e2e/tests/test-templates-list-actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/test/e2e/tests/test-templates-list-actions.js b/awx/ui/test/e2e/tests/test-templates-list-actions.js index 0ffba23a1b..6c27571f8c 100644 --- a/awx/ui/test/e2e/tests/test-templates-list-actions.js +++ b/awx/ui/test/e2e/tests/test-templates-list-actions.js @@ -176,8 +176,8 @@ module.exports = { client.expect.element('#node-1 text').text.not.equal('').after(5000); client.expect.element('#node-2 text').text.not.equal('').after(5000); client.expect.element('#node-3 text').text.not.equal('').after(5000); - client.expect.element('#node-4 text').text.not.equal('').after(5000); - + client.expect.element('#node-4 text').text.not.equal('').after(5000); + client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..'); client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-project")]/..'); client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-inventory")]/..'); From e5645dd79864d59077057c819ae5544fc0963b2b Mon Sep 17 00:00:00 2001 From: John Hill Date: Thu, 29 Nov 2018 19:35:11 -0500 Subject: [PATCH 3/3] one more --- awx/ui/test/e2e/tests/test-templates-list-actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/test/e2e/tests/test-templates-list-actions.js b/awx/ui/test/e2e/tests/test-templates-list-actions.js index 6c27571f8c..e324209704 100644 --- a/awx/ui/test/e2e/tests/test-templates-list-actions.js +++ b/awx/ui/test/e2e/tests/test-templates-list-actions.js @@ -177,7 +177,7 @@ module.exports = { client.expect.element('#node-2 text').text.not.equal('').after(5000); client.expect.element('#node-3 text').text.not.equal('').after(5000); client.expect.element('#node-4 text').text.not.equal('').after(5000); - + client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..'); client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-project")]/..'); client.useXpath().waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-inventory")]/..');