INNER CODE UNIT · TypeScript
deleteEntity
odigos-io/odigos · frontend/webapp/cypress/functions/index.ts:213
export const deleteEntity = ({ nodeId, nodeContains, warnModalTitle, warnModalNote }: DeleteEntityOptions, callback?: () => void) => {
openOverviewEntity({ nodeId, nodeContains });
cy.get(DATA_IDS.DRAWER_DELETE).click();
if (!!warnModalTitle) cy.get(DATA_IDS.MODAL).contains(warnModalTitle).should('exist');
if (!!warnModalNote) cy.get(DATA_IDS.MODAL).contains(warnModalNote).should('exist');
cy.get(DATA_IDS.APPROVE).click();
if (!!callback) callback();
waitForDrawerClosed();
};
interface UpdateV2EntityOptions {
// Where to click to open the drawer — either a selector or, when paired with `nodeContains`,
// an HTML tag passed to `cy.contains()` (e.g. `'div'`).
nodeId: string;