mirror of
https://github.com/fleetdm/fleet
synced 2026-04-27 00:17:21 +00:00
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
import React from "react";
|
|
import { render, screen } from "@testing-library/react";
|
|
|
|
import RegistrationForm from "components/forms/RegistrationForm";
|
|
|
|
describe("RegistrationForm - component", () => {
|
|
it("renders AdminDetails on the first page", () => {
|
|
const { container } = render(<RegistrationForm page={1} />);
|
|
|
|
expect(
|
|
container.querySelectorAll(".user-registration__container--admin").length
|
|
).toEqual(1);
|
|
// headers moved up to parent RegistrationPage.tsx
|
|
});
|
|
|
|
it("renders OrgDetails on the second page", () => {
|
|
const { container } = render(<RegistrationForm page={2} />);
|
|
|
|
expect(
|
|
container.querySelectorAll(".user-registration__container--org").length
|
|
).toEqual(1);
|
|
});
|
|
|
|
it("renders FleetDetails on the third page", () => {
|
|
const { container } = render(<RegistrationForm page={3} />);
|
|
|
|
expect(
|
|
container.querySelectorAll(".user-registration__container--fleet").length
|
|
).toEqual(1);
|
|
});
|
|
|
|
it("renders ConfirmationPage on the fourth page", () => {
|
|
const { container } = render(<RegistrationForm page={4} />);
|
|
|
|
expect(
|
|
container.querySelectorAll(".user-registration__container--confirmation")
|
|
.length
|
|
).toEqual(1);
|
|
});
|
|
});
|