Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
appuk committed May 14, 2024
1 parent 941d184 commit 6376883
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
8 changes: 0 additions & 8 deletions cypress/support/commands.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
} from '../../frontend/eda/interfaces/EdaRulebookActivation';
import { EdaUser, EdaUserCreateUpdate } from '../../frontend/eda/interfaces/EdaUser';
import { EdaTeam } from '../../frontend/eda/interfaces/EdaTeam';
import { RoleDetail } from '../../frontend/eda/interfaces/EdaRole';
import { EdaRbacRole } from '../../frontend/eda/interfaces/EdaRbacRole';
import { Role as HubRole } from '../../frontend/hub/access/roles/Role';
import { RemoteRegistry } from '../../frontend/hub/administration/remote-registries/RemoteRegistry';
Expand Down Expand Up @@ -1283,13 +1282,6 @@ declare global {
*/
createEdaCredential(): Chainable<EdaCredential>;

/**
* Creates an EDA credential and returns the same.
*
* @returns {Chainable<EdaCredentialType>}
*/
createEdaCredentialType(): Chainable<EdaCredentialType>;

/**
* Some of the Eda roles (Admin, Contributor etc) have resources
* with more than 5 set of actions. this command helps in asserting
Expand Down
37 changes: 1 addition & 36 deletions cypress/support/eda-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { EdaDecisionEnvironment } from '../../frontend/eda/interfaces/EdaDecisionEnvironment';
import { EdaProject } from '../../frontend/eda/interfaces/EdaProject';
import { EdaResult } from '../../frontend/eda/interfaces/EdaResult';
import { EdaRole, RoleDetail } from '../../frontend/eda/interfaces/EdaRole';
import { EdaRbacRole } from '../../frontend/eda/interfaces/EdaRbacRole';
import { EdaRulebook } from '../../frontend/eda/interfaces/EdaRulebook';
import {
EdaRulebookActivation,
Expand Down Expand Up @@ -249,41 +249,6 @@ Cypress.Commands.add('pollEdaResults', (url: string) => {
});
});

Cypress.Commands.add('createEdaCredentialType', () => {
cy.requestPost<EdaCredentialTypeCreate>(edaAPI`/credential-types/`, {
name: 'E2E Credential Type' + randomString(4),
// inputs: ["abc", "amxmx"],
// inputs: [: "dhdn"],
inputs: {
fields: [
{
id: 'username', // Unique identifier for the field
label: 'Username', // User-friendly label
type: 'string', // Data type expected (string, password, etc.)
},
],
},
description: 'This is a credential type',
}).then((edaCredentialType) => {
Cypress.log({
displayName: 'EDA CREDENTIAL CREATION :',
message: [`Created 👉 ${edaCredentialType.name}`],
});
return edaCredentialType;
});
});

Cypress.Commands.add('deleteEdaCredentialType', (credential_type: EdaCredentialType) => {
cy.requestDelete(edaAPI`/credential-types/${credential_type.id.toString()}/?force=true`, {
failOnStatusCode: false,
}).then(() => {
Cypress.log({
displayName: 'EDA CREDENTIAL DELETION :',
message: [`Deleted 👉 ${credential_type.name}`],
});
});
});

Cypress.Commands.add('createEdaCredential', () => {
cy.requestPost<EdaCredentialCreate>(edaAPI`/eda-credentials/`, {
name: 'E2E Credential ' + randomString(4),
Expand Down

0 comments on commit 6376883

Please sign in to comment.