fix: fail safe on missing workspace revisions
This commit is contained in:
@@ -232,6 +232,24 @@ test("shows a migration banner for legacy descriptors and does not load editor d
|
||||
expect(screen.queryByLabelText("Vector collection")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("shows an actionable unavailable message when a workspace summary omits its canonical revision", async () => {
|
||||
const user = userEvent.setup();
|
||||
server.use(
|
||||
http.get("/api/workspaces", () => HttpResponse.json([
|
||||
{
|
||||
id: "broken-workspace", name: "Broken workspace", displayName: "Broken workspace", description: "Broken data",
|
||||
language: "en", file: "workspaces/broken-workspace.yaml",
|
||||
},
|
||||
])),
|
||||
);
|
||||
renderManager();
|
||||
|
||||
await user.click(await screen.findByRole("button", { name: "Broken workspace" }));
|
||||
|
||||
expect(await screen.findByText("This workspace summary is incomplete. Refresh the registry or choose another workspace before creating sessions or editing drafts.")).toBeVisible();
|
||||
expect(screen.queryByLabelText("Vector collection")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("shows an accessible retry instead of a loading status when the registry status query fails", async () => {
|
||||
const user = userEvent.setup();
|
||||
let calls = 0;
|
||||
|
||||
Reference in New Issue
Block a user