Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display WF always nodes in conjunction with success and failure #2373

Merged
7 changes: 7 additions & 0 deletions awx/ui/test/e2e/commands/findThenClick.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exports.command = function findThenClick (selector) {
this
.waitForElementPresent(selector)
.moveToElement(selector, 0, 0)
.click(selector);
return this;
};
53 changes: 53 additions & 0 deletions awx/ui/test/e2e/tests/test-workflow-visualizer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {
getInventorySource,
getJobTemplate,
getProject,
getWorkflowTemplate
} from '../fixtures';

let data;
const workflowTemplateNavTab = "//at-side-nav-item[contains(@name, 'TEMPLATES')]";
const workflowSelector = "//a[contains(text(), 'test-actions-workflow-template')]";
const workflowVisualizerBtn = "//button[contains(@id, 'workflow_job_template_workflow_visualizer_btn')]";

const rootNode = "//*[@id='node-2']";
const childNode = "";
const leafNode = "//g[contains(@id, 'node-1')]";
const project = "//td[contains(text(), 'test-actions-project')]";
const edgeTypeDropdown = "//span[contains(@id, 'select2-workflow_node_edge-container')]";
const alwaysDropdown = "//*[@id='select2-workflow_node_edge-result-elm7-always']"
const successDropdown = "//*[@id='select2-workflow_node_edge-result-veyc-success']"
const failureDropdown = "//*[@id='select2-workflow_node_edge-result-xitr-failure']"

module.exports = {
before: (client, done) => {
const resources = [
getInventorySource('test-actions'),
getJobTemplate('test-actions'),
getProject('test-actions'),
getWorkflowTemplate('test-actions'),
];

Promise.all(resources)
.then(([source, template, project, workflow]) => {
data = { source, template, project, workflow };
done();
});
client
.login()
.waitForAngular()
.resizeWindow(1200, 1000)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's avoid doing this midtest. We can launch chrome with a certain window size if it's necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed this happens across a ton of the UI tests ~15 times. I've made #2426 to track the issue to be handled en masse.

.useXpath()
.findThenClick(workflowTemplateNavTab)
.pause(1000)
.findThenClick(workflowSelector)
.findThenClick(workflowVisualizerBtn);
},
'verify that workflow visualizer root node can only be set to always': client => {
client
.useXpath()
.findThenClick(rootNode)
.findThenClick(project)
.findThenClick(edgeTypeDropdown);
},
};