Chore: full react hooks eslint compliance (#7040)

This commit is contained in:
shamoon
2026-08-21 14:00:02 -07:00
committed by GitHub
parent 7c26cf6d97
commit 4c361422ca
111 changed files with 1072 additions and 867 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ describe("widgets/pangolin/component", () => {
const service = { widget: { type: "pangolin" } };
const { container } = renderWithProviders(<Component service={service} />, { settings: { hideErrors: false } });
expect(service.widget.fields).toEqual(["sites", "resources", "targets", "traffic"]);
expect(service.widget.fields).toBeUndefined();
// Container filters by widget.fields, so only the default 4 blocks are visible.
expect(container.querySelectorAll(".service-block")).toHaveLength(4);
expect(screen.getByText("pangolin.sites")).toBeInTheDocument();
@@ -39,7 +39,7 @@ describe("widgets/pangolin/component", () => {
const service = { widget: { type: "pangolin", fields: ["sites", "resources", "targets", "traffic", "extra"] } };
renderWithProviders(<Component service={service} />, { settings: { hideErrors: false } });
expect(service.widget.fields).toEqual(["sites", "resources", "targets", "traffic"]);
expect(service.widget.fields).toEqual(["sites", "resources", "targets", "traffic", "extra"]);
});
it("renders computed site/resource/target totals and traffic bytes", () => {