feat: add editorial registration and authentication
This commit is contained in:
1 parent
7acaacb92e
commit
9b22752ef2
20 files changed
+1728
-20
No files matched your search
@@ -0,0 +1,41 @@
|
||||
// @vitest-environment jsdom
|
||||
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { expect, test, vi } from "vitest";
|
||||
|
||||
import { RegistrationForm } from "./public-forms";
|
||||
|
||||
test("registration presents separate B2B, terms, and privacy acknowledgements", () => {
|
||||
render(
|
||||
<RegistrationForm
|
||||
action={vi.fn()}
|
||||
legalUrls={{
|
||||
imprint: "https://example.com/impressum",
|
||||
privacy: "https://example.com/datenschutz",
|
||||
terms: "https://example.com/nutzungsbedingungen",
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByRole("checkbox", {
|
||||
name: /im namen einer redaktion oder eines unternehmens/i,
|
||||
}),
|
||||
).toHaveProperty("required", true);
|
||||
expect(screen.getByRole("checkbox", { name: /nutzungs- und lizenzbedingungen/i })).toHaveProperty(
|
||||
"required",
|
||||
true,
|
||||
);
|
||||
expect(screen.getByRole("checkbox", { name: /datenschutzerklärung/i })).toHaveProperty(
|
||||
"required",
|
||||
true,
|
||||
);
|
||||
expect(screen.getByRole("link", { name: /nutzungs- und lizenzbedingungen/i })).toHaveProperty(
|
||||
"href",
|
||||
"https://example.com/nutzungsbedingungen",
|
||||
);
|
||||
expect(screen.getByRole("link", { name: /datenschutzerklärung/i })).toHaveProperty(
|
||||
"href",
|
||||
"https://example.com/datenschutz",
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user