INNER CODE UNIT · TypeScript

openOverviewEntity

odigos-io/odigos · frontend/webapp/cypress/functions/index.ts:62

const openOverviewEntity = ({ nodeId, nodeContains }: { nodeId: string; nodeContains?: string }) => {
  clickRetryable(nodeId, nodeContains);
  cy.get(DATA_IDS.DRAWER).should('exist');
};

interface WaitForCrdCountOptions {
  namespace: string;
  crdName: string;
  minCount: number;
  maxAttempts?: number;
  intervalMs?: number;
}

// Poll until CRD count is >= minCount (create path can lag behind the UI toast on slower clusters).
export const waitForCrdCount = ({ namespace, crdName, minCount, maxAttempts = 15, intervalMs = 2000 }: WaitForCrdCountOptions) => {
  const attempt = (remaining: number): Cypress.Chainable<string[]> => {
    return cy.exec(`kubectl get ${crdName} -n ${namespace} | awk 'NR>1 {print $1}'`, { failOnNonZeroExit: false }).then(({ stdout }) => {
      const crdIds = stdout.split('\n').filter((s) => !!s);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…