feat(housekeeping): finish accessible command deck
This commit is contained in:
1 parent
85ad0452d3
commit
a113e48880
55 files changed
+17064
-509
No files matched your search
@@ -79,6 +79,45 @@ const result: OperationsWorkspaceLoadResult = {
|
||||
};
|
||||
|
||||
const savePreferences = vi.fn(async (value) => ok(value, "saved"));
|
||||
const labels = {
|
||||
title: "Operations workspace",
|
||||
description: "Capability-derived operational home",
|
||||
noDomainsTitle: "No operational domains are available",
|
||||
noDomainsDescription: "No authorized domain",
|
||||
partial: "Some workspace sections are unavailable",
|
||||
inbox: {
|
||||
title: "Operational inbox",
|
||||
domainFilter: "Filter by domain",
|
||||
stateFilter: "Filter by state",
|
||||
priorityFilter: "Filter by priority",
|
||||
all: "All",
|
||||
loading: "Loading",
|
||||
empty: "Empty",
|
||||
partial: "Some sources are unavailable",
|
||||
open: "Open",
|
||||
},
|
||||
recent: { title: "Recent work", empty: "Nothing recent" },
|
||||
favorites: {
|
||||
title: "Favorites",
|
||||
pin: "Pin",
|
||||
unpin: "Unpin",
|
||||
error: "Preferences could not be saved",
|
||||
reorderInstructions: "Press Space, then use arrow keys.",
|
||||
},
|
||||
widgetSettings: {
|
||||
title: "Widget settings",
|
||||
mandatory: "Mandatory",
|
||||
error: "Preferences could not be saved",
|
||||
},
|
||||
widgets: {
|
||||
title: "Widgets",
|
||||
partial: "Some widgets are unavailable",
|
||||
error: "Widget order could not be saved",
|
||||
reorderInstructions: "Press Space, then use arrow keys.",
|
||||
},
|
||||
} as const;
|
||||
const routeTitles = { Users: "Users" };
|
||||
const widgetTitles = { "people.queue": "People queue" };
|
||||
|
||||
describe("OperationsWorkspacePage", () => {
|
||||
it("renders capability-filtered sections, partial failures, and preview links", () => {
|
||||
@@ -88,6 +127,9 @@ describe("OperationsWorkspacePage", () => {
|
||||
routes={routes}
|
||||
widgetDefinitions={widgets}
|
||||
surface="preview"
|
||||
labels={labels}
|
||||
routeTitles={routeTitles}
|
||||
widgetTitles={widgetTitles}
|
||||
savePreferences={savePreferences}
|
||||
/>,
|
||||
);
|
||||
@@ -97,8 +139,8 @@ describe("OperationsWorkspacePage", () => {
|
||||
expect(html).toContain("Favorites");
|
||||
expect(html).toContain("Widget settings");
|
||||
expect(html).toContain("Some workspace sections are unavailable");
|
||||
expect(html).toContain("system.alerts");
|
||||
expect(html).toContain("system.health");
|
||||
expect(html).not.toContain("system.alerts");
|
||||
expect(html).not.toContain("system.health");
|
||||
expect(html).toContain('href="/ase-next/people/users"');
|
||||
});
|
||||
|
||||
@@ -109,6 +151,9 @@ describe("OperationsWorkspacePage", () => {
|
||||
routes={[]}
|
||||
widgetDefinitions={[]}
|
||||
surface="preview"
|
||||
labels={labels}
|
||||
routeTitles={{}}
|
||||
widgetTitles={{}}
|
||||
savePreferences={savePreferences}
|
||||
/>,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user