fleet/frontend/components/forms/RegistrationForm/RegistrationForm.tests.jsx
Gabe Hernandez efb35b537a
add prettier and have it format all fleet application code (#625)
* add prettier and have it format all js code except website:
:

* trying running prettier check in CI

* fix runs on in CI

* change CI job name

* fix prettier erros and fix CI
2021-04-12 14:32:25 +01:00

35 lines
1.1 KiB
JavaScript

import React from "react";
import { mount } from "enzyme";
import RegistrationForm from "components/forms/RegistrationForm";
describe("RegistrationForm - component", () => {
it("renders AdminDetails and header on the first page", () => {
const form = mount(<RegistrationForm page={1} />);
expect(form.find("AdminDetails").length).toEqual(1);
expect(form.text()).toContain("Setup user");
});
it("renders OrgDetails on the second page", () => {
const form = mount(<RegistrationForm page={2} />);
expect(form.find("OrgDetails").length).toEqual(1);
expect(form.text()).toContain("Organization details");
});
it("renders KolideDetails on the third page", () => {
const form = mount(<RegistrationForm page={3} />);
expect(form.find("KolideDetails").length).toEqual(1);
expect(form.text()).toContain("Set Fleet URL");
});
it("renders ConfirmationPage on the fourth page", () => {
const form = mount(<RegistrationForm page={4} />);
expect(form.find("ConfirmationPage").length).toEqual(1);
expect(form.text()).toContain("You're all set");
});
});