fleet/frontend/pages/admin/IntegrationsPage/IntegrationPage.tests.tsx
Roberto Dip e06b00df11
Add readonly MDM.EnabledAndConfigured to app config and device responses (#9575)
Related to #9571, this adds a new value to both responses which is
calculated when the Fleet server is started, and only set to `true` if
the server is properly configured for MDM.

This helps the UI to determine wether or not we should show certain UI
elements that we only want to show to servers with MDM enabled.
2023-02-01 14:47:52 -03:00

23 lines
628 B
TypeScript

import React from "react";
import { screen } from "@testing-library/react";
import { createCustomRenderer } from "test/test-utils";
import IntegrationsPage from "./IntegrationsPage";
describe("Integrations Page", () => {
it("renders the MDM section in the side nav if MDM feature is enabled", () => {
const render = createCustomRenderer({
withBackendMock: true,
context: {
app: { isMdmFeatureFlagEnabled: true },
},
});
render(<IntegrationsPage params={{ section: "mdm" }} />);
expect(
screen.getByText("Mobile Device Management (MDM)")
).toBeInTheDocument();
});
});