mirror of
https://github.com/fleetdm/fleet
synced 2026-04-23 06:27:26 +00:00
relates to #11450 This will show the profile status aggregate UI at all times when on the macOS settings page. This is a change from showing it conditionally. This also cleans up where some of the requests occur to move it closer to where it is needed and changing the `MdmProfileStatus` enum to a union. - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Manual QA for all new/changed functionality
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { render, screen } from "@testing-library/react";
|
|
import { createCustomRenderer } from "test/test-utils";
|
|
import { MacMdmProfileOperationType } from "interfaces/mdm";
|
|
import MacSettingStatusCell from "./MacSettingStatusCell";
|
|
|
|
describe("Mac setting status cell", () => {
|
|
it("Correctly displays the status text of a profile", () => {
|
|
const status = "verifying";
|
|
const operationType: MacMdmProfileOperationType = "install";
|
|
|
|
render(
|
|
<MacSettingStatusCell status={status} operationType={operationType} />
|
|
);
|
|
|
|
expect(screen.getByText("Verifying")).toBeInTheDocument();
|
|
});
|
|
|
|
it("Correctly displays the tooltip text for a profile", async () => {
|
|
const status = "verifying";
|
|
const operationType: MacMdmProfileOperationType = "install";
|
|
|
|
const customRender = createCustomRenderer();
|
|
|
|
const { user } = customRender(
|
|
<MacSettingStatusCell status={status} operationType={operationType} />
|
|
);
|
|
|
|
const statusText = screen.getByText("Verifying");
|
|
|
|
await user.hover(statusText);
|
|
|
|
expect(screen.getByText("Host applied the setting.")).toBeInTheDocument();
|
|
});
|
|
});
|