fix(webui): explain disabled preset deletion

This commit is contained in:
Xubin Ren
2026-08-07 12:42:37 +08:00
parent 6f2512ce9a
commit 1b12fbae39
2 changed files with 32 additions and 19 deletions
+6 -1
View File
@@ -2169,7 +2169,12 @@ describe("SettingsView Apps catalog", () => {
expect(row.nextElementSibling).toBe(editor);
expect(editor).toHaveClass("slide-in-from-top-1", "bg-muted/10");
expect(within(editor).getByDisplayValue("Primary")).toBeInTheDocument();
expect(within(editor).getByRole("button", { name: "Delete" })).toBeDisabled();
const deleteButton = within(editor).getByRole("button", { name: "Delete" });
expect(deleteButton).toBeDisabled();
expect(deleteButton).toHaveAttribute("aria-describedby", "model-preset-delete-hint");
expect(
within(editor).getByText("Remove this preset from the call order before deleting it."),
).toBeInTheDocument();
fireEvent.click(trigger);