diff --git a/docs/widgets/services/netalertx.md b/docs/widgets/services/netalertx.md index 5c28deeca..44775fb87 100644 --- a/docs/widgets/services/netalertx.md +++ b/docs/widgets/services/netalertx.md @@ -19,7 +19,7 @@ Provide the `API_TOKEN` (f.k.a. `SYNC_api_token`) as the `key` in your config. ```yaml widget: type: netalertx - url: http://ip:port # backend port + url: http://ip:port # use backend port for widget version 2+ key: yournetalertxapitoken version: 2 # optional, default is 1 ``` diff --git a/package.json b/package.json index 9e768b0f3..fcaf99b98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.9.0", + "version": "1.10.0", "private": true, "scripts": { "preinstall": "npx only-allow pnpm", diff --git a/src/__tests__/pages/index.test.jsx b/src/__tests__/pages/index.test.jsx index 4355e9387..2a53425fc 100644 --- a/src/__tests__/pages/index.test.jsx +++ b/src/__tests__/pages/index.test.jsx @@ -339,7 +339,7 @@ describe("pages/index Index routing + SWR branches", () => { localStorage.setItem("hash", "old-hash"); const fetchSpy = vi.fn(async () => ({ ok: true })); - // eslint-disable-next-line no-global-assign + fetch = fetchSpy; let reloadSpy; diff --git a/src/components/quicklaunch.test.jsx b/src/components/quicklaunch.test.jsx index 77262db1e..65cf7a508 100644 --- a/src/components/quicklaunch.test.jsx +++ b/src/components/quicklaunch.test.jsx @@ -277,7 +277,7 @@ describe("components/quicklaunch", () => { const fetchSpy = vi.fn(async () => ({ json: async () => ["test", ["test 1", "test 2", "test 3", "test 4", "test 5"]], })); - // eslint-disable-next-line no-global-assign + fetch = fetchSpy; renderWithProviders(, { @@ -315,7 +315,6 @@ describe("components/quicklaunch", () => { expect(input).toHaveValue("test 1"); - // eslint-disable-next-line no-global-assign fetch = originalFetch; }); diff --git a/src/components/widgets/search/search.test.jsx b/src/components/widgets/search/search.test.jsx index 80f8ec421..cbb603884 100644 --- a/src/components/widgets/search/search.test.jsx +++ b/src/components/widgets/search/search.test.jsx @@ -32,7 +32,13 @@ vi.mock("@headlessui/react", async () => { const ctx = useContext(ListboxContext); const content = typeof children === "function" ? children({ active: false }) : children; return ( -
ctx?.onChange?.(value)} {...props}> +
ctx?.onChange?.(value)} + {...props} + > {content}
); @@ -166,7 +172,7 @@ describe("components/widgets/search", () => { const fetchSpy = vi.fn(async () => ({ json: async () => ["hel", ["hello", "help", "helm", "helium", "held"]], })); - // eslint-disable-next-line no-global-assign + fetch = fetchSpy; renderWithProviders(, { @@ -192,7 +198,7 @@ describe("components/widgets/search", () => { expect(openSpy).toHaveBeenCalledWith("https://www.google.com/search?q=hello", "_self"); openSpy.mockRestore(); - // eslint-disable-next-line no-global-assign + fetch = originalFetch; }); });