mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 07:58:31 +00:00
# Checklist for submitter add ability in the UI to wipe a host managed by the fleet mdm. This includes: **new wipe host action dropdown option:**  **new wipe modal to initiate wiping a host:**  **wipe and wiping host status tags: **   - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. - [x] Manual QA for all new/changed functionality
37 lines
946 B
TypeScript
37 lines
946 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 sidenav and content if MDM feature is enabled", () => {
|
|
const render = createCustomRenderer({
|
|
withBackendMock: true,
|
|
context: {
|
|
app: { isMacMdmEnabledAndConfigured: true },
|
|
},
|
|
});
|
|
|
|
render(
|
|
<IntegrationsPage router={mockRouter} params={{ section: "mdm" }} />
|
|
);
|
|
|
|
expect(screen.getAllByText("Mobile device management (MDM)")).toHaveLength(
|
|
2
|
|
);
|
|
});
|
|
});
|