Pin phone sheets to the visible viewport, and let people correct login and organizer errors.

This commit is contained in:
adilallo committed 2026-11-11 17:01:44 -07:00
1 parent 27d74e510c
commit 39807ef452
17 files changed
+236 -16

No files matched your search

+25
View File
@@ -424,4 +424,29 @@ describe("LoginForm", () => {
expect(requestMagicLink).toHaveBeenCalledTimes(2);
});
});
it("shows the email field again when send it again fails", async () => {
const user = userEvent.setup();
vi.mocked(requestMagicLink)
.mockResolvedValueOnce({ ok: true })
.mockRejectedValueOnce(new Error("network"));
renderLoginForm();
await user.type(
screen.getByRole("textbox", { name: /email address/i }),
"pat@example.com",
);
await user.click(
screen.getByRole("button", { name: /send login link/i }),
);
await user.click(
await screen.findByRole("button", { name: /send it again/i }),
);
expect(
await screen.findByRole("textbox", { name: /email address/i }),
).toHaveValue("pat@example.com");
expect(
screen.getByText(/check your connection/i),
).toBeInTheDocument();
});
});