mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-16 08:12:42 +08:00
refactor(proxy): remove is_proxy_target in favor of failover_queue
- Remove `is_proxy_target` field from Provider struct (Rust & TypeScript) - Remove related DAO methods: get_proxy_target_provider, set_proxy_target - Remove deprecated Tauri commands: get_proxy_targets, set_proxy_target - Add `is_available()` method to CircuitBreaker for availability checks without consuming HalfOpen probe permits (used in select_providers) - Keep `allow_request()` for actual request gating with permit tracking - Update stream_check to use failover_queue instead of is_proxy_target - Clean up commented-out reset circuit breaker button in ProviderActions - Remove unused useProxyTargets and useSetProxyTarget hooks
This commit is contained in:
@@ -150,6 +150,7 @@ describe("SettingsPage integration", () => {
|
||||
expect(screen.getByText("language:zh")).toBeInTheDocument(),
|
||||
);
|
||||
fireEvent.click(screen.getByText("settings.tabAdvanced"));
|
||||
fireEvent.click(screen.getByText("配置文件目录"));
|
||||
const appInput = await screen.findByPlaceholderText(
|
||||
"settings.browsePlaceholderApp",
|
||||
);
|
||||
@@ -165,6 +166,7 @@ describe("SettingsPage integration", () => {
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByText("settings.tabAdvanced"));
|
||||
fireEvent.click(screen.getByText("数据管理"));
|
||||
fireEvent.click(screen.getByText("settings.selectConfigFile"));
|
||||
await waitFor(() =>
|
||||
expect(screen.getByTestId("selected-file").textContent).toContain(
|
||||
@@ -188,6 +190,7 @@ describe("SettingsPage integration", () => {
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByText("settings.tabAdvanced"));
|
||||
fireEvent.click(screen.getByText("配置文件目录"));
|
||||
const appInput = await screen.findByPlaceholderText(
|
||||
"settings.browsePlaceholderApp",
|
||||
);
|
||||
@@ -214,6 +217,7 @@ describe("SettingsPage integration", () => {
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByText("settings.tabAdvanced"));
|
||||
fireEvent.click(screen.getByText("配置文件目录"));
|
||||
|
||||
const browseButtons = screen.getAllByTitle("settings.browseDirectory");
|
||||
const resetButtons = screen.getAllByTitle("settings.resetDefault");
|
||||
@@ -253,6 +257,7 @@ describe("SettingsPage integration", () => {
|
||||
expect(screen.getByText("language:zh")).toBeInTheDocument(),
|
||||
);
|
||||
fireEvent.click(screen.getByText("settings.tabAdvanced"));
|
||||
fireEvent.click(screen.getByText("数据管理"));
|
||||
|
||||
server.use(
|
||||
http.post("http://tauri.local/save_file_dialog", () =>
|
||||
|
||||
Reference in New Issue
Block a user