feat(housekeeping): complete people moderation parity
This commit is contained in:
1 parent
3d385d1869
commit
29fe22297b
41 files changed
+3465
-580
No files matched your search
@@ -11,6 +11,7 @@ vi.mock("@/actions/housekeeping-command", () => ({
|
||||
import {
|
||||
fail,
|
||||
type HousekeepingCapabilityContext,
|
||||
type HousekeepingDomainManifest,
|
||||
type HousekeepingResult,
|
||||
ok,
|
||||
} from "../../../foundation/contracts";
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
PEOPLE_PRIMARY_ROUTE_HANDLERS,
|
||||
PEOPLE_PRIMARY_ROUTE_IDS,
|
||||
} from "../route-handlers";
|
||||
import { PEOPLE_ROUTE_IDS } from "../routes";
|
||||
import { PeopleCommunityPage } from "./community";
|
||||
import { PeopleMultiAccountsPage } from "./multi-accounts";
|
||||
import { parsePeopleListInput } from "./page-state";
|
||||
@@ -263,7 +265,7 @@ describe.each(cases)("People $name page", ({ render, empty, ready }) => {
|
||||
});
|
||||
|
||||
describe("People primary route registration", () => {
|
||||
it("registers exactly the nine real primary routes and handlers", () => {
|
||||
it("keeps the nine primary handlers and registers the complete People catalog", () => {
|
||||
const expected = [
|
||||
"people.users.list",
|
||||
"people.users.edit",
|
||||
@@ -276,7 +278,9 @@ describe("People primary route registration", () => {
|
||||
"people.staff.teams",
|
||||
];
|
||||
expect(PEOPLE_PRIMARY_ROUTE_IDS).toEqual(expected);
|
||||
expect(peopleManifest.routes.map((route) => route.id)).toEqual(expected);
|
||||
expect(peopleManifest.routes.map((route) => route.id)).toEqual(
|
||||
PEOPLE_ROUTE_IDS,
|
||||
);
|
||||
expect(
|
||||
PEOPLE_PRIMARY_ROUTE_HANDLERS.map((handler) => handler.routeId),
|
||||
).toEqual(expected);
|
||||
@@ -284,9 +288,9 @@ describe("People primary route registration", () => {
|
||||
HOUSEKEEPING_ROUTE_HANDLERS.map((handler) => handler.routeId),
|
||||
).toEqual(expect.arrayContaining(expected));
|
||||
expect(
|
||||
HOUSEKEEPING_MANIFESTS.flatMap((manifest) => manifest.routes).map(
|
||||
(route) => route.id,
|
||||
),
|
||||
(
|
||||
HOUSEKEEPING_MANIFESTS as readonly HousekeepingDomainManifest[]
|
||||
).flatMap((manifest) => manifest.routes.map((route) => route.id)),
|
||||
).toEqual(HOUSEKEEPING_ROUTE_HANDLERS.map((handler) => handler.routeId));
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user