mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-30 03:41:50 -05:00
prevent flake for user e2e
This commit is contained in:
@@ -5,14 +5,17 @@ import {
|
||||
getWorkflowTemplate
|
||||
} from '../fixtures';
|
||||
|
||||
import {
|
||||
AWX_E2E_URL,
|
||||
AWX_E2E_TIMEOUT_LONG
|
||||
} from '../settings';
|
||||
|
||||
let data;
|
||||
const spinny = "//*[contains(@class, 'spinny')]";
|
||||
const workflowTemplateNavTab = "//at-side-nav-item[contains(@name, 'TEMPLATES')]";
|
||||
const workflowSelector = "//a[contains(text(), 'test-actions-workflow-template')]";
|
||||
const workflowSelector = "//a[text()='test-actions-workflow-template']";
|
||||
const workflowVisualizerBtn = "//button[contains(@id, 'workflow_job_template_workflow_visualizer_btn')]";
|
||||
const workflowSearchBar = "//input[contains(@class, 'SmartSearch-input')]";
|
||||
const workflowText = 'name.iexact:"test-actions-workflow-template"';
|
||||
const workflowSearchBadgeCount = '//span[contains(@class, "at-Panel-headingTitleBadge") and contains(text(), "1")]';
|
||||
|
||||
const startNodeId = '1';
|
||||
let initialJobNodeId;
|
||||
@@ -65,17 +68,21 @@ module.exports = {
|
||||
.login()
|
||||
.waitForAngular()
|
||||
.resizeWindow(1200, 1000)
|
||||
.navigateTo(`${AWX_E2E_URL}/#/templates`, false)
|
||||
.useXpath()
|
||||
.findThenClick(workflowTemplateNavTab)
|
||||
.pause(1500)
|
||||
.waitForElementNotVisible(spinny)
|
||||
.clearValue(workflowSearchBar)
|
||||
.setValue(workflowSearchBar, [workflowText, client.Keys.ENTER])
|
||||
.waitForElementVisible(workflowSearchBadgeCount)
|
||||
.waitForElementNotVisible(spinny)
|
||||
.findThenClick(workflowSelector)
|
||||
.findThenClick(workflowVisualizerBtn)
|
||||
.waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..');
|
||||
.waitForElementVisible(workflowSearchBar)
|
||||
.setValue(workflowSearchBar, [workflowText])
|
||||
.click('//*[contains(@class, "SmartSearch-searchButton")]')
|
||||
.waitForSpinny(true)
|
||||
.click('//*[contains(@class, "SmartSearch-clearAll")]')
|
||||
.waitForSpinny(true)
|
||||
.setValue(workflowSearchBar, [workflowText])
|
||||
.click('//*[contains(@class, "SmartSearch-searchButton")]')
|
||||
.waitForSpinny(true)
|
||||
.click(workflowSelector)
|
||||
.waitForSpinny(true)
|
||||
.click(workflowVisualizerBtn);
|
||||
client.waitForElementVisible('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..');
|
||||
|
||||
// Grab the ids of the nodes
|
||||
client.getAttribute('//*[contains(@class, "WorkflowChart-nameText") and contains(text(), "test-actions-job")]/..', 'id', (res) => {
|
||||
|
||||
Reference in New Issue
Block a user