diff --git a/frontend/e2e/exchange.spec.ts b/frontend/e2e/exchange.spec.ts index 4efc648..e9ef278 100644 --- a/frontend/e2e/exchange.spec.ts +++ b/frontend/e2e/exchange.spec.ts @@ -250,8 +250,8 @@ test.describe("Trades Page", () => { test("trades page shows Start trading link when empty", async ({ page }) => { await page.goto("/trades"); - // Wait for content to load - await page.waitForTimeout(1000); + // Wait for loading to finish - either "Loading trades..." disappears or we see content + await expect(page.getByText("Loading trades...")).not.toBeVisible({ timeout: 5000 }); // Check if it shows empty state with link, or trades exist const startTradingLink = page.getByRole("link", { name: "Start trading" });