feat: refine metadata catalog workflows

This commit is contained in:
Codex
2026-09-02 11:38:47 +02:00
parent 076c9742c5
commit 4531746038
48 changed files with 1345 additions and 493 deletions
@@ -15,6 +15,19 @@ const actions = [
},
] as const;
test("disables the picker when no rows are selected", () => {
render(
<FleetActionSelector
actions={actions}
selectedCount={0}
onRun={vi.fn()}
onClear={vi.fn()}
/>,
);
expect(screen.getByRole("combobox", { name: "Batch action" })).toBeDisabled();
});
test("keeps unavailable commands discoverable and explains why Run is disabled", async () => {
const user = userEvent.setup();
render(
@@ -50,6 +63,7 @@ test("runs an enabled command explicitly and resets the picker", async () => {
await user.selectOptions(picker, "sync");
expect(screen.getByText("All tables in this database")).toBeVisible();
expect(screen.getByText("Action scope")).toBeVisible();
expect(screen.getByRole("button", { name: "Run action" })).toHaveClass("bg-destructive");
await user.click(screen.getByRole("button", { name: "Run action" }));
expect(onRun).toHaveBeenCalledWith("sync");