diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36c332352..b47617b43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,6 +99,9 @@ jobs: - name: Unit tests run: pnpm test:unit + - name: Build frontend + run: pnpm build:renderer + backend: name: Backend Checks runs-on: ${{ matrix.os }} diff --git a/tests/components/PiProviderForm.test.tsx b/tests/components/PiProviderForm.test.tsx index 880decde5..b761535f3 100644 --- a/tests/components/PiProviderForm.test.tsx +++ b/tests/components/PiProviderForm.test.tsx @@ -1344,22 +1344,25 @@ describe("PiProviderForm", () => { it("edits Pi thinking-map missing, null, and string states from the collapsed capability area", async () => { const user = userEvent.setup(); + // Start with a model so this test exercises thinking-map interactions without + // repeating the separately covered preset selection and model creation flow. render( {}} + initialData={{ + name: "Custom reasoning provider", + settingsConfig: { + api: "openai-completions", + models: [completeModel("custom-reasoning-model")], + }, + }} />, ); - await user.click( - screen.getByRole("button", { name: "providerPreset.custom" }), - ); - await user.click(screen.getByRole("button", { name: "pi.form.addModel" })); - fireEvent.change(screen.getByLabelText("pi.form.modelId"), { - target: { value: "custom-reasoning-model" }, - }); await user.click( screen.getByRole("button", { name: "展开或收起模型详情" }), ); diff --git a/vitest.config.ts b/vitest.config.ts index c58d0f499..e226110b8 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -10,6 +10,7 @@ export default defineConfig({ }, }, test: { + include: ["{src,tests}/**/*.{test,spec}.{ts,tsx,js,jsx}"], environment: "jsdom", setupFiles: ["./tests/setupGlobals.ts", "./tests/setupTests.ts"], globals: true,