From b3660b4d294fca00aa27d235188d8f185deb2769 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Tue, 3 Dec 2024 00:22:24 +0100 Subject: [PATCH] test(frontend): fixed failing tests --- agenta-web/cypress/support/commands/evaluations.ts | 13 +------------ .../app-management/components/GetStartedSection.tsx | 1 + 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/agenta-web/cypress/support/commands/evaluations.ts b/agenta-web/cypress/support/commands/evaluations.ts index a1294709eb..ab3ea2e881 100644 --- a/agenta-web/cypress/support/commands/evaluations.ts +++ b/agenta-web/cypress/support/commands/evaluations.ts @@ -15,18 +15,7 @@ Cypress.Commands.add("createVariant", () => { cy.addingOpenaiKey() cy.visit("/apps") - // Check if there are app variants present - cy.request({ - url: `${Cypress.env().baseApiURL}/apps`, - method: "GET", - }).then((resp) => { - if (resp.body.length) { - cy.get('[data-cy="create-new-app-button"]').click() - cy.get('[data-cy="create-from-template"]').click() - } else { - cy.get('[data-cy="create-from-template"]').click() - } - }) + cy.get('[data-cy="create-from-template"]').click() const appName = randString(5) cy.task("log", `App name: ${appName}`) diff --git a/agenta-web/src/components/pages/app-management/components/GetStartedSection.tsx b/agenta-web/src/components/pages/app-management/components/GetStartedSection.tsx index b251c64f24..701ddf3342 100644 --- a/agenta-web/src/components/pages/app-management/components/GetStartedSection.tsx +++ b/agenta-web/src/components/pages/app-management/components/GetStartedSection.tsx @@ -79,6 +79,7 @@ const GetStartedSection = ({ setIsAddAppFromTemplatedModal(true) } }} + data-cy="create-from-template" >
Create New Prompt