diff --git a/tests/e2e/group-b-quota-plans-config.spec.ts b/tests/e2e/group-b-quota-plans-config.spec.ts index 58f322bc48..409e22eb9b 100644 --- a/tests/e2e/group-b-quota-plans-config.spec.ts +++ b/tests/e2e/group-b-quota-plans-config.spec.ts @@ -142,9 +142,13 @@ test.describe("Group B — Quota Plans Config", () => { await selector.selectOption({ label: /codex/i }); } - // After selection, the page should not be in a broken state + // After selection, the page should not be in a broken state. + // Note: page.content() includes the full HTML source, which contains Next.js + // chunk filenames — those hashes can legitimately contain the string "500". + // Checking for "500" in raw HTML is unreliable; instead check for the actual + // error boundary text that OmniRoute renders on unrecoverable errors + // (src/app/error.tsx heading: "Internal Server Error"). const pageContent = await page.content(); - expect(pageContent).not.toContain("500"); expect(pageContent).not.toContain("Internal Server Error"); }); }); diff --git a/tests/e2e/playground-compare.spec.ts b/tests/e2e/playground-compare.spec.ts index e9789f8d6c..9a1cc49c46 100644 --- a/tests/e2e/playground-compare.spec.ts +++ b/tests/e2e/playground-compare.spec.ts @@ -109,15 +109,30 @@ test.describe("Playground Compare Tab", () => { await expect(compareTab).toBeVisible({ timeout: 15000 }); await compareTab.click(); + // Wait for CompareTab to finish loading (it's a dynamic import with ssr: false). + // The "Add model column" button is always rendered once the component mounts and + // provides a reliable hydration signal before we check the Run/Cancel toolbar. + await expect(page.getByRole("button", { name: /add model/i })).toBeVisible({ + timeout: 10000, + }); + // The toolbar shows "Run all" when idle and "Cancel all" when streaming — // they are mutually exclusive. Verify the toolbar control is always present - // by checking that at least one of the two buttons is visible. + // by checking that exactly one of the two buttons is visible. // (CompareTab.tsx renders