From 6bdcdd446acc3c018ed1023081d61b610bb7ee30 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 8 Dec 2023 14:02:14 +0100 Subject: [PATCH] modifies playground test --- agenta-web/cypress.config.ts | 1 + agenta-web/cypress/e2e/playground.cy.ts | 7 ++----- agenta-web/src/components/Playground/Views/TestView.tsx | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/agenta-web/cypress.config.ts b/agenta-web/cypress.config.ts index 6824bd5527..2d69a1f196 100644 --- a/agenta-web/cypress.config.ts +++ b/agenta-web/cypress.config.ts @@ -11,6 +11,7 @@ export default defineConfig({ baseUrl: "http://localhost", defaultCommandTimeout: 30000, requestTimeout: 10000, + specPattern: ["*/e2e/playground.cy.ts"], }, env: { baseApiURL: "http://localhost/api", diff --git a/agenta-web/cypress/e2e/playground.cy.ts b/agenta-web/cypress/e2e/playground.cy.ts index 29bf8bf079..a486e47257 100644 --- a/agenta-web/cypress/e2e/playground.cy.ts +++ b/agenta-web/cypress/e2e/playground.cy.ts @@ -6,11 +6,8 @@ describe("Playground Prompt Test", function () { it("Should test prompt functionality in the Playground", () => { cy.get('[data-cy^="testview-input-parameters"]').eq(0).type("Germany") cy.get('[data-cy="testview-input-parameters-run-button"]').click() - cy.get('textarea[placeholder="Results will be shown here"].ant-input').should( - "contain.text", - "Loading...", - ) - cy.get('textarea[placeholder="Results will be shown here"].ant-input').should( + cy.get('[data-cy="testview-input-parameters-result"]').should("contain.text", "Loading...") + cy.get('[data-cy="testview-input-parameters-result"]').should( "contain.text", "The capital of Germany is Berlin.", ) diff --git a/agenta-web/src/components/Playground/Views/TestView.tsx b/agenta-web/src/components/Playground/Views/TestView.tsx index b6d9bb5dfd..4033747cce 100644 --- a/agenta-web/src/components/Playground/Views/TestView.tsx +++ b/agenta-web/src/components/Playground/Views/TestView.tsx @@ -184,9 +184,8 @@ const BoxComponent: React.FC = ({ {!isChatVariant && ( - +