From d55b405a6c0c3efb1c68707e582b040ded25c4ca Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Sat, 7 Dec 2024 12:30:48 -0300 Subject: [PATCH] refactor: Remove unnecessary wait timeouts in chatInputOutputUser-shard-2.spec.ts (#5127) * chore: Remove unnecessary wait timeouts in chatInputOutputUser-shard-2.spec.ts --- .../integrations/chatInputOutputUser-shard-2.spec.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/frontend/tests/extended/integrations/chatInputOutputUser-shard-2.spec.ts b/src/frontend/tests/extended/integrations/chatInputOutputUser-shard-2.spec.ts index 868716e4d..358e92e2c 100644 --- a/src/frontend/tests/extended/integrations/chatInputOutputUser-shard-2.spec.ts +++ b/src/frontend/tests/extended/integrations/chatInputOutputUser-shard-2.spec.ts @@ -17,8 +17,6 @@ test( await page.goto("/"); - await page.waitForTimeout(1000); - let modalCount = 0; try { const modalTitleElement = await page?.getByTestId("modal-title"); @@ -31,7 +29,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(); } @@ -52,14 +52,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(); } @@ -73,7 +71,6 @@ test( await page.getByTestId("dropdown_str_model_name").click(); await page.getByTestId("gpt-4o-1-option").click(); - await page.waitForTimeout(1000); await page.getByText("Playground", { exact: true }).last().click(); await page.waitForSelector('[data-testid="input-chat-playground"]', {