diff --git a/frontend/src/views/admin/__tests__/GroupsView.codexManifest.spec.ts b/frontend/src/views/admin/__tests__/GroupsView.codexManifest.spec.ts index 9595d27ed3..0aef73f4fc 100644 --- a/frontend/src/views/admin/__tests__/GroupsView.codexManifest.spec.ts +++ b/frontend/src/views/admin/__tests__/GroupsView.codexManifest.spec.ts @@ -1,5 +1,6 @@ import { defineComponent, h, type PropType } from "vue"; import { flushPromises, mount } from "@vue/test-utils"; +import { createPinia } from "pinia"; import { beforeEach, describe, expect, it, vi } from "vitest"; import type { AdminGroup, CodexModelsManifestConfig } from "@/types"; @@ -7,13 +8,13 @@ import GroupsView from "@/views/admin/GroupsView.vue"; const { listGroups, - getModelsListCandidates, + getModelAllowlistCandidates, getUsageSummary, getCapacitySummary, getLiveCapability, } = vi.hoisted(() => ({ listGroups: vi.fn(), - getModelsListCandidates: vi.fn(), + getModelAllowlistCandidates: vi.fn(), getUsageSummary: vi.fn(), getCapacitySummary: vi.fn(), getLiveCapability: vi.fn(), @@ -24,7 +25,7 @@ vi.mock("@/api/admin", () => ({ groups: { list: listGroups, getAll: vi.fn(), - getModelsListCandidates, + getModelAllowlistCandidates, getUsageSummary, getCapacitySummary, getLiveCapability, @@ -204,6 +205,7 @@ const CodexManifestAccountsFieldStub = defineComponent({ const mountView = () => mount(GroupsView, { global: { + plugins: [createPinia()], stubs: { AppLayout: AppLayoutStub, TablePageLayout: TablePageLayoutStub, @@ -230,7 +232,7 @@ describe("GroupsView Codex manifest binding", () => { beforeEach(() => { localStorage.clear(); listGroups.mockReset(); - getModelsListCandidates.mockReset(); + getModelAllowlistCandidates.mockReset(); getUsageSummary.mockReset(); getCapacitySummary.mockReset(); getLiveCapability.mockReset(); @@ -242,7 +244,7 @@ describe("GroupsView Codex manifest binding", () => { page_size: 20, pages: 1, }); - getModelsListCandidates.mockResolvedValue([]); + getModelAllowlistCandidates.mockResolvedValue([]); getUsageSummary.mockResolvedValue([]); getCapacitySummary.mockResolvedValue([]); getLiveCapability.mockResolvedValue({ supported: false });