Hold /privacy behind a flag until counsel reads it, and fix leftover legal and email copy.
This commit is contained in:
1 parent
ead6c8f716
commit
072e5362f5
43 files changed
+548
-191
No files matched your search
@@ -78,7 +78,11 @@ describe("LoginForm", () => {
|
||||
});
|
||||
|
||||
it("links terms and privacy to the legal pages", () => {
|
||||
renderLoginForm();
|
||||
renderWithProviders(
|
||||
<Suspense fallback={null}>
|
||||
<LoginForm privacyEnabled />
|
||||
</Suspense>,
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Terms of Service" }),
|
||||
).toHaveAttribute("href", "/terms");
|
||||
@@ -87,6 +91,16 @@ describe("LoginForm", () => {
|
||||
).toHaveAttribute("href", "/privacy");
|
||||
});
|
||||
|
||||
it("links terms only when the privacy policy is off", () => {
|
||||
renderLoginForm();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Terms of Service" }),
|
||||
).toHaveAttribute("href", "/terms");
|
||||
expect(
|
||||
screen.queryByRole("link", { name: "Privacy Policy" }),
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("shows validation error when email is invalid", async () => {
|
||||
const user = userEvent.setup();
|
||||
renderLoginForm();
|
||||
|
||||
Reference in new issue
Block a user