Enhancement: better display of Arcane widget errors (#6281)

This commit is contained in:
shamoon
2026-02-05 00:33:38 -08:00
committed by GitHub
parent 4974cd96b6
commit f729290e96
2 changed files with 12 additions and 1 deletions

View File

@@ -34,6 +34,16 @@ describe("widgets/arcane/component", () => {
expect(screen.getByText("arcane.environment_required")).toBeInTheDocument();
});
it("shows an error when API calls return detail errors", () => {
useWidgetAPI.mockImplementation(() => ({ data: { detail: "Specific API error" }, error: undefined }));
renderWithProviders(<Component service={{ widget: { type: "arcane", env: "prod" } }} />, {
settings: { hideErrors: false },
});
expect(screen.getByText("Specific API error")).toBeInTheDocument();
});
it("renders placeholders while loading data", () => {
useWidgetAPI.mockImplementation(() => ({ data: undefined, error: undefined }));