Skip to content

Commit

Permalink
reducing the number of resources and simplying wfjt
Browse files Browse the repository at this point in the history
  • Loading branch information
acruzgon committed Jul 23, 2024
1 parent ae8ae61 commit 2abc6ea
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions cypress/e2e/awx/administration/wfApprovalsList.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Workflow Approvals Tests', () => {
let approvalWFNode: WorkflowNode;
let jobName = '';

beforeEach(() => {
before(() => {
cy.createAwxOrganization().then((org) => {
organization = org;

Expand Down Expand Up @@ -55,19 +55,18 @@ describe('Workflow Approvals Tests', () => {
});
});

afterEach(() => {
after(() => {
cy.deleteAwxJobTemplate(jobTemplate, { failOnStatusCode: false });
cy.deleteAwxInventory(inventory, { failOnStatusCode: false });
cy.deleteAwxProject(project, { failOnStatusCode: false });
cy.deleteAwxUser(userWFApprove, { failOnStatusCode: false });
cy.deleteAwxOrganization(organization, { failOnStatusCode: false });
});

describe('Workflow Approvals - Approve, Deny, Delete', () => {
it('admin can approve and then delete a workflow approval from the list row item', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-APPROVE-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand Down Expand Up @@ -151,8 +150,6 @@ describe('Workflow Approvals Tests', () => {
it('admin can deny and then delete a workflow approval from the list row item', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-DENY-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand Down Expand Up @@ -224,8 +221,6 @@ describe('Workflow Approvals Tests', () => {
it('admin can cancel and then delete a workflow approval from the list row item', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-CANCEL-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand Down Expand Up @@ -297,8 +292,6 @@ describe('Workflow Approvals Tests', () => {
it('can enable concurrent jobs in a WFJT with a WF approval node, launch multiple jobs, bulk approve, then bulk delete from list toolbar', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-BULK APPROVE-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand All @@ -320,8 +313,6 @@ describe('Workflow Approvals Tests', () => {
it('can enable concurrent jobs in a WFJT with a WF approval node, launch multiple jobs, bulk deny, then bulk delete from list toolbar', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-BULK DENY-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand Down Expand Up @@ -458,8 +449,6 @@ describe('Workflow Approvals Tests', () => {
it('can assign normal user the access to approve a workflow approval from the list toolbar', () => {
cy.createAwxWorkflowJobTemplate({
name: 'E2E Workflow Approval-USER APPROVE-' + randomString(4),
organization: organization.id,
inventory: inventory.id,
}).then((wfjt) => {
workflowJobTemplate = wfjt;
cy.createAwxWorkflowVisualizerJobTemplateNode(workflowJobTemplate, jobTemplate).then(
Expand Down

0 comments on commit 2abc6ea

Please sign in to comment.