Skip to content

Commit

Permalink
Revert "[EDA] [SER] Event Stream tests" (#3023)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis authored Aug 21, 2024
1 parent 05e44b5 commit 47fab54
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 245 deletions.
27 changes: 0 additions & 27 deletions cypress/e2e/eda/Credentials/credentials-crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,31 +121,4 @@ cyLabel(['aaas-unsupported'], function () {
});
});
});

it('get warning while deleting a credential already in use by an event stream', () => {
cy.createBasicWebhookCredential().then((credential) => {
cy.createBasicWebhook(credential).then((webhook) => {
cy.log('name', credential);
cy.navigateTo('eda', 'credentials');
cy.verifyPageTitle('Credentials');
cy.clickTableRow(credential.name);
cy.intercept('DELETE', edaAPI`/eda-credentials/${credential.id.toString()}/?force=true`).as(
'deleted'
);
cy.verifyPageTitle(credential.name);
cy.clickPageAction('delete-credential');
cy.clickModalConfirmCheckbox();
cy.get('.pf-v5-c-alert__title').contains(
`The following credentials are in use: ${credential.name}`
);
cy.clickModalButton('Delete credential');
cy.wait('@deleted').then((deleted) => {
expect(deleted?.response?.statusCode).to.eql(204);
cy.verifyPageTitle('Credentials');
});
cy.deleteWebhook(webhook);
cy.deleteEdaCredential(credential);
});
});
});
});
78 changes: 0 additions & 78 deletions cypress/e2e/eda/Event-Streams/event-stream-list.cy.ts

This file was deleted.

74 changes: 0 additions & 74 deletions cypress/e2e/eda/Event-Streams/event-streams-crud.cy.ts

This file was deleted.

22 changes: 0 additions & 22 deletions cypress/support/commands.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { WorkflowJobTemplate } from '../../frontend/awx/interfaces/WorkflowJobTe
import { WorkflowNode } from '../../frontend/awx/interfaces/WorkflowNode';
import { EdaControllerToken } from '../../frontend/eda/interfaces/EdaControllerToken';
import { EdaCredential } from '../../frontend/eda/interfaces/EdaCredential';
import { EdaWebhook } from '../../frontend/eda/interfaces/EdaWebhook';
import { EdaCredentialType } from '../../frontend/eda/interfaces/EdaCredentialType';
import { EdaDecisionEnvironment } from '../../frontend/eda/interfaces/EdaDecisionEnvironment';
import { EdaProject } from '../../frontend/eda/interfaces/EdaProject';
Expand Down Expand Up @@ -1356,27 +1355,6 @@ declare global {
*/
createEdaCredential(): Chainable<EdaCredential>;

/**
* Creates an EDA credential of type Basic Webhook and returns the same.
*
* @returns {Chainable<EdaCredential>}
*/
createBasicWebhookCredential(): Chainable<EdaCredential>;

/**
* Creates an Event Stream with the Basic Webhook type credential and returns the same.
*
* @returns {Chainable<EdaWebhook>}
*/
createBasicWebhook(credential: EdaCredential): Chainable<EdaWebhook>;

/**
* Deletes the Event Stream which is provided.
*
* @returns {Chainable<EdaWebhook>}
*/
deleteWebhook(Webhook: EdaWebhook): Chainable<void>;

/**
* Some of the Eda roles (Admin, Contributor etc) have resources
* with more than 5 set of actions. this command helps in asserting
Expand Down
44 changes: 0 additions & 44 deletions cypress/support/eda-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EdaCredentialType,
EdaCredentialTypeCreate,
} from '../../frontend/eda/interfaces/EdaCredentialType';
import { EdaWebhook, EdaWebhookCreate } from '../../frontend/eda/interfaces/EdaWebhook';
import { EdaDecisionEnvironment } from '../../frontend/eda/interfaces/EdaDecisionEnvironment';
import { EdaProject } from '../../frontend/eda/interfaces/EdaProject';
import { EdaResult } from '../../frontend/eda/interfaces/EdaResult';
Expand Down Expand Up @@ -293,49 +292,6 @@ Cypress.Commands.add('createEdaCredential', () => {
});
});

Cypress.Commands.add('createBasicWebhookCredential', () => {
cy.requestPost<EdaCredentialCreate>(edaAPI`/eda-credentials/`, {
name: 'E2E Basic Webhook Credential ' + randomString(4),
credential_type_id: 7,
description: 'This is a basic webhook credential',
inputs: {
username: 'username',
password: 'password',
},
}).then((edaCredential) => {
Cypress.log({
displayName: 'EDA CREDENTIAL CREATION :',
message: [`Created 👉 ${edaCredential.name}`],
});
return edaCredential;
});
});

Cypress.Commands.add('createBasicWebhook', (credential: EdaCredential) => {
cy.requestPost<EdaWebhookCreate>(edaAPI`/webhooks/`, {
name: 'E2E Basic Webhook ' + randomString(4),
webhook_type: 'basic',
eda_credential_id: credential.id,
}).then((Webhook) => {
Cypress.log({
displayName: 'EDA WEBHOOK CREATION :',
message: [`Created 👉 ${Webhook.name}`],
});
return Webhook;
});
});

Cypress.Commands.add('deleteWebhook', (Webhook: EdaWebhook) => {
cy.requestDelete(edaAPI`/webhooks/${Webhook.id.toString()}/?force=true`, {
failOnStatusCode: false,
}).then(() => {
Cypress.log({
displayName: 'EDA WEBHOOK DELETION :',
message: [`Deleted 👉 ${Webhook.name}`],
});
});
});

Cypress.Commands.add('deleteEdaCredential', (credential: EdaCredential) => {
cy.requestDelete(edaAPI`/eda-credentials/${credential.id.toString()}/?force=true`, {
failOnStatusCode: false,
Expand Down

0 comments on commit 47fab54

Please sign in to comment.