From 0a35422d1da40faa63fd64a1ebf1b105a9ed70bf Mon Sep 17 00:00:00 2001 From: "Richard Kuo (Danswer)" Date: Wed, 4 Dec 2024 16:47:42 -0800 Subject: [PATCH] wait for the page to load --- web/tests/e2e/home.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/tests/e2e/home.spec.ts b/web/tests/e2e/home.spec.ts index 2b1605fa1..ff6105ce6 100644 --- a/web/tests/e2e/home.spec.ts +++ b/web/tests/e2e/home.spec.ts @@ -27,5 +27,11 @@ test( await page.click('button[type="submit"]'); await page.waitForURL("http://localhost:3000/chat"); + + // Create the locator (no waiting happens here) + const textarea = page.locator('textarea[placeholder="Send a message "]'); + + // Explicitly wait for the textarea to be visible + await expect(textarea).toBeVisible(); } );