forked from baron/baron-sso
31 lines
740 B
TypeScript
31 lines
740 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { canShowWorksmobileEntry } from "./TenantDetailPage";
|
|
|
|
describe("TenantDetailPage Worksmobile entry visibility", () => {
|
|
it("shows Worksmobile entry only for hanmac-family root tenant", () => {
|
|
expect(
|
|
canShowWorksmobileEntry({
|
|
id: "hanmac-family-id",
|
|
slug: "hanmac-family",
|
|
parentId: undefined,
|
|
}),
|
|
).toBe(true);
|
|
|
|
expect(
|
|
canShowWorksmobileEntry({
|
|
id: "hanmac-child-id",
|
|
slug: "hanmac-family",
|
|
parentId: "root-id",
|
|
}),
|
|
).toBe(false);
|
|
|
|
expect(
|
|
canShowWorksmobileEntry({
|
|
id: "other-id",
|
|
slug: "other",
|
|
parentId: undefined,
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
});
|