mirror of
https://github.com/fleetdm/fleet
synced 2026-05-01 10:27:35 +00:00
relates to #10745 Implements the UI for automatic enrollment. This includes: **moving ABM section into this page**  **implementing end user authentication**  **implement uploading EULA pdf**   - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. - [x] Manual QA for all new/changed functionality
37 lines
948 B
TypeScript
37 lines
948 B
TypeScript
import React from "react";
|
|
import { screen } from "@testing-library/react";
|
|
|
|
import { createCustomRenderer } from "test/test-utils";
|
|
import IntegrationsPage from "./IntegrationsPage";
|
|
|
|
// TODO: figure out how to mock the router properly.
|
|
const mockRouter = {
|
|
push: jest.fn(),
|
|
replace: jest.fn(),
|
|
goBack: jest.fn(),
|
|
goForward: jest.fn(),
|
|
go: jest.fn(),
|
|
setRouteLeaveHook: jest.fn(),
|
|
isActive: jest.fn(),
|
|
createHref: jest.fn(),
|
|
createPath: jest.fn(),
|
|
};
|
|
|
|
describe("Integrations Page", () => {
|
|
it("renders the MDM section in the side nav if MDM feature is enabled", () => {
|
|
const render = createCustomRenderer({
|
|
withBackendMock: true,
|
|
context: {
|
|
app: { isMdmEnabledAndConfigured: true },
|
|
},
|
|
});
|
|
|
|
render(
|
|
<IntegrationsPage router={mockRouter} params={{ section: "mdm" }} />
|
|
);
|
|
|
|
expect(
|
|
screen.getByText("Mobile device management (MDM)")
|
|
).toBeInTheDocument();
|
|
});
|
|
});
|