mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:34:51 +08:00
fix(forms): reflect automatic Copilot protocol routing (#8196)
This commit is contained in:
1 parent
9decd60e80
commit
bd50984e05
9 files changed
+62
-4
No files matched your search
@@ -185,6 +185,13 @@ describe("ClaudeDesktopProviderForm", () => {
|
||||
});
|
||||
expect(modelModePicker).toHaveTextContent("模型映射");
|
||||
expect(modelModePicker).toBeDisabled();
|
||||
if (providerType === "github_copilot") {
|
||||
const formatControl = screen
|
||||
.getByText("copilot.automaticFormat")
|
||||
.closest("button");
|
||||
expect(formatControl).toBeDisabled();
|
||||
expect(screen.getByText(/copilot.automaticFormatHint/)).toBeVisible();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -142,6 +142,17 @@ describe("ClaudeFormFields", () => {
|
||||
expect(copilotApiMock.copilotGetModelsForAccount).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each(["classic", "stack"] as const)(
|
||||
"Copilot %s 布局显示自动协议并禁用无效的手选格式",
|
||||
(variant) => {
|
||||
renderCopilotForm({ variant, apiFormat: "openai_responses" });
|
||||
const control = screen.getByRole("combobox", { name: "上游格式" });
|
||||
expect(control).toBeDisabled();
|
||||
expect(control).toHaveTextContent("copilot.automaticFormat");
|
||||
expect(screen.getByText(/copilot.automaticFormatHint/)).toBeVisible();
|
||||
},
|
||||
);
|
||||
|
||||
it("点击获取模型列表后才请求当前 Copilot 账号的模型", async () => {
|
||||
renderCopilotForm();
|
||||
|
||||
|
||||
Reference in new issue
Block a user