History

Guard create-org input against hydration clobbering

Rhys Sullivan committed 4 months ago

Commit fcd1b0a1 parent 8841d311 file · +11 −1Browse files

Unified · Split

e2e/cloud/auth-routing-flow.test.ts+11−1
@@ -56,7 +56,17 @@ scenario( · 55 unmodified lines
5656 });
5757
5858 await step("Create the first org → canonical dashboard at /<slug>", async () => {
59− await page.getByPlaceholder("Northwind Labs").fill("Flow Test Org");
59+ const orgName = "Flow Test Org";
60+ const orgNameInput = page.getByPlaceholder("Northwind Labs");
61+ await page.waitForLoadState("networkidle");
62+ await orgNameInput.fill(orgName);
63+ await page.waitForTimeout(250);
64+ if ((await orgNameInput.inputValue()) !== orgName) {
65+ await orgNameInput.fill(orgName);
66+ }
67+ expect(await orgNameInput.inputValue(), "org name survives create-org hydration").toBe(
68+ orgName,
69+ );
6070 await page.getByRole("button", { name: "Create organization" }).click();
6171 await page.getByText("Connect your MCP client").waitFor({ timeout: 30_000 });
6272 await page.getByRole("button", { name: "Continue to app" }).click();