diff --git a/src/frontend/tests/core/integrations/Simple Agent.spec.ts b/src/frontend/tests/core/integrations/Simple Agent.spec.ts index 44e7b0803..bbaebd1a8 100644 --- a/src/frontend/tests/core/integrations/Simple Agent.spec.ts +++ b/src/frontend/tests/core/integrations/Simple Agent.spec.ts @@ -6,10 +6,10 @@ import uaParser from "ua-parser-js"; test( "Simple Agent", { tag: ["@release", "@starter-project"] }, - async ({ page }) => { test.skip( !process?.env?.OPENAI_API_KEY, + "OPENAI_API_KEY required to run this test", ); @@ -38,7 +38,9 @@ test( while (modalCount === 0) { await page.getByText("New Flow", { exact: true }).click(); - await page.waitForTimeout(3000); + await page.waitForSelector('[data-testid="modal-title"]', { + timeout: 3000, + }); modalCount = await page.getByTestId("modal-title")?.count(); } @@ -63,14 +65,12 @@ test( while (outdatedComponents > 0) { await page.getByTestId("icon-AlertTriangle").first().click(); - await page.waitForTimeout(1000); outdatedComponents = await page.getByTestId("icon-AlertTriangle").count(); } let filledApiKey = await page.getByTestId("remove-icon-badge").count(); while (filledApiKey > 0) { await page.getByTestId("remove-icon-badge").first().click(); - await page.waitForTimeout(1000); filledApiKey = await page.getByTestId("remove-icon-badge").count(); } @@ -83,8 +83,6 @@ test( await page.getByTestId("dropdown_str_model_name").click(); await page.getByTestId("gpt-4o-1-option").click(); - await page.waitForTimeout(500); - await page.getByTestId("button_run_chat output").last().click(); await page.waitForSelector("text=built successfully", {