diff --git a/backend/src/utils/result.ts b/backend/src/utils/result.ts index 2c79813f8b22..2e99fe2e4e87 100644 --- a/backend/src/utils/result.ts +++ b/backend/src/utils/result.ts @@ -122,5 +122,14 @@ export function replaceLegacyValues(result: DBResult): DBResult { }; } + if (typeof result.mode2 === "number") { + result.mode2 = (result.mode2 as number).toString(); + } + + //legacy value for english_1k + if ((result.language as string) === "english_expanded") { + result.language = "english_1k"; + } + return result; } diff --git a/frontend/__tests__/components/core/Theme.spec.tsx b/frontend/__tests__/components/core/Theme.spec.tsx index 5bd1a3b2ce29..35a2f5ec604e 100644 --- a/frontend/__tests__/components/core/Theme.spec.tsx +++ b/frontend/__tests__/components/core/Theme.spec.tsx @@ -85,13 +85,13 @@ describe("Theme component", () => { it("removes CSS when theme has no CSS", async () => { themeSignalMock.mockImplementation(() => ({ name: "light" }) as any); const { css } = renderComponent(); - expect(css.getAttribute("href")).toBe(""); + expect(css).not.toBeInTheDocument(); }); it("removes CSS when theme is custom", async () => { themeSignalMock.mockImplementation(() => ({ name: "custom" }) as any); const { css } = renderComponent(); - expect(css.getAttribute("href")).toBe(""); + expect(css).not.toBeInTheDocument(); }); it("handles CSS load error", () => { diff --git a/frontend/__tests__/elements/account/result-filters.spec.ts b/frontend/__tests__/components/pages/account/utils.spec.ts similarity index 88% rename from frontend/__tests__/elements/account/result-filters.spec.ts rename to frontend/__tests__/components/pages/account/utils.spec.ts index 3403dda6b256..9ab523def755 100644 --- a/frontend/__tests__/elements/account/result-filters.spec.ts +++ b/frontend/__tests__/components/pages/account/utils.spec.ts @@ -1,8 +1,8 @@ import { describe, it, expect } from "vitest"; -import defaultResultFilters from "../../../src/ts/constants/default-result-filters"; -import { mergeWithDefaultFilters } from "../../../src/ts/elements/account/result-filters"; +import defaultResultFilters from "../../../../src/ts/constants/default-result-filters"; +import { mergeWithDefaultFilters } from "../../../../src/ts/components/pages/account/utils"; -describe("result-filters.ts", () => { +describe("utils.ts", () => { describe("mergeWithDefaultFilters", () => { it("should merge with default filters correctly", () => { const tests = [ diff --git a/frontend/__tests__/controllers/preset-controller.spec.ts b/frontend/__tests__/controllers/preset-controller.spec.ts index baef3596b82f..816e9edab7e3 100644 --- a/frontend/__tests__/controllers/preset-controller.spec.ts +++ b/frontend/__tests__/controllers/preset-controller.spec.ts @@ -9,7 +9,7 @@ import * as ConfigUtils from "../../src/ts/config/utils"; import * as Persistence from "../../src/ts/config/persistence"; import * as Notifications from "../../src/ts/states/notifications"; import * as TestLogic from "../../src/ts/test/test-logic"; -import * as TagController from "../../src/ts/controllers/tag-controller"; +import * as Tags from "../../src/ts/collections/tags"; describe("PresetController", () => { describe("apply", () => { @@ -34,12 +34,9 @@ describe("PresetController", () => { "showSuccessNotification", ); const testRestartMock = vi.spyOn(TestLogic, "restart"); - const tagControllerClearMock = vi.spyOn(TagController, "clear"); - const tagControllerSetMock = vi.spyOn(TagController, "set"); - const tagControllerSaveActiveMock = vi.spyOn( - TagController, - "saveActiveToLocalStorage", - ); + const tagsClearMock = vi.spyOn(Tags, "clearActiveTags"); + const tagsSetMock = vi.spyOn(Tags, "setTagActive"); + const tagsSaveActiveMock = vi.spyOn(Tags, "saveActiveToLocalStorage"); beforeEach(() => { [ @@ -49,9 +46,9 @@ describe("PresetController", () => { configGetConfigChangesMock, notificationAddMock, testRestartMock, - tagControllerClearMock, - tagControllerSetMock, - tagControllerSaveActiveMock, + tagsClearMock, + tagsSetMock, + tagsSaveActiveMock, ].forEach((it) => it.mockClear()); configApplyMock.mockResolvedValue(); @@ -66,7 +63,7 @@ describe("PresetController", () => { //THEN expect(configApplyMock).toHaveBeenCalledWith(preset.config); - expect(tagControllerClearMock).toHaveBeenCalled(); + expect(tagsClearMock).toHaveBeenCalled(); expect(testRestartMock).toHaveBeenCalled(); expect(notificationAddMock).toHaveBeenCalledWith("Preset applied", { durationMs: 2000, @@ -84,20 +81,10 @@ describe("PresetController", () => { await PresetController.apply(preset._id); //THEN - expect(tagControllerClearMock).toHaveBeenCalled(); - expect(tagControllerSetMock).toHaveBeenNthCalledWith( - 1, - "tagOne", - true, - false, - ); - expect(tagControllerSetMock).toHaveBeenNthCalledWith( - 2, - "tagTwo", - true, - false, - ); - expect(tagControllerSaveActiveMock).toHaveBeenCalled(); + expect(tagsClearMock).toHaveBeenCalled(); + expect(tagsSetMock).toHaveBeenNthCalledWith(1, "tagOne", true, false); + expect(tagsSetMock).toHaveBeenNthCalledWith(2, "tagTwo", true, false); + expect(tagsSaveActiveMock).toHaveBeenCalled(); }); it("should ignore unknown preset", async () => { @@ -145,20 +132,10 @@ describe("PresetController", () => { await PresetController.apply(preset._id); //THEN - expect(tagControllerClearMock).toHaveBeenCalled(); - expect(tagControllerSetMock).toHaveBeenNthCalledWith( - 1, - "tagOne", - true, - false, - ); - expect(tagControllerSetMock).toHaveBeenNthCalledWith( - 2, - "tagTwo", - true, - false, - ); - expect(tagControllerSaveActiveMock).toHaveBeenCalled(); + expect(tagsClearMock).toHaveBeenCalled(); + expect(tagsSetMock).toHaveBeenNthCalledWith(1, "tagOne", true, false); + expect(tagsSetMock).toHaveBeenNthCalledWith(2, "tagTwo", true, false); + expect(tagsSaveActiveMock).toHaveBeenCalled(); }); const givenPreset = (partialPreset: Partial): Preset => { diff --git a/frontend/package.json b/frontend/package.json index 38af68dbf817..e90f7a3721c0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -39,14 +39,14 @@ "@solid-primitives/transition-group": "1.1.2", "@solidjs/meta": "0.29.4", "@tanstack/pacer-lite": "0.2.1", - "@tanstack/query-db-collection": "1.0.27", - "@tanstack/solid-db": "0.2.10", - "@tanstack/solid-devtools": "0.8.0", - "@tanstack/solid-form": "1.28.4", - "@tanstack/solid-hotkeys": "0.4.2", - "@tanstack/solid-hotkeys-devtools": "0.4.3", - "@tanstack/solid-query": "5.90.23", - "@tanstack/solid-query-devtools": "5.91.3", + "@tanstack/query-db-collection": "1.0.36", + "@tanstack/solid-db": "0.2.19", + "@tanstack/solid-devtools": "0.8.2", + "@tanstack/solid-form": "1.29.1", + "@tanstack/solid-hotkeys": "0.9.1", + "@tanstack/solid-hotkeys-devtools": "0.6.6", + "@tanstack/solid-query": "5.100.3", + "@tanstack/solid-query-devtools": "5.100.3", "@tanstack/solid-table": "8.21.3", "@ts-rest/core": "3.52.1", "animejs": "4.2.2", @@ -55,7 +55,7 @@ "chart.js": "3.7.1", "chartjs-adapter-date-fns": "3.0.0", "chartjs-plugin-annotation": "2.2.1", - "chartjs-plugin-trendline": "3.2.0", + "chartjs-plugin-trendline": "3.2.4", "clsx": "2.1.1", "color-blend": "4.0.0", "damerau-levenshtein": "1.0.8", @@ -82,7 +82,7 @@ "@monkeytype/typescript-config": "workspace:*", "@solidjs/testing-library": "0.8.10", "@tailwindcss/vite": "4.2.1", - "@tanstack/eslint-plugin-query": "5.91.4", + "@tanstack/eslint-plugin-query": "5.100.3", "@testing-library/dom": "10.4.1", "@testing-library/jest-dom": "6.9.1", "@testing-library/user-event": "14.6.1", diff --git a/frontend/src/html/pages/account.html b/frontend/src/html/pages/account.html deleted file mode 100644 index 0797dd993b28..000000000000 --- a/frontend/src/html/pages/account.html +++ /dev/null @@ -1,428 +0,0 @@ - diff --git a/frontend/src/html/popups.html b/frontend/src/html/popups.html index 4dd3c50507ed..0461edfa0343 100644 --- a/frontend/src/html/popups.html +++ b/frontend/src/html/popups.html @@ -7,12 +7,6 @@ - -