wait for the page to load

This commit is contained in:
Richard Kuo (Danswer) 2024-12-04 16:47:42 -08:00
parent ef9942b751
commit 0a35422d1d

View File

@ -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();
}
);