feat: improve proxy account setup and backup portability
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
createAccountToggleQueue,
|
||||
enqueueAccountToggleIntent,
|
||||
filterAccountDialogOptions,
|
||||
formatAccountOperationError,
|
||||
getAvailableAccountOptions,
|
||||
getAccountDialogSelectableOptions,
|
||||
isAccountRowSelectionKey,
|
||||
@@ -33,6 +34,24 @@ describe("account mode filter", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("account operation errors", () => {
|
||||
it("replaces wrapped IPC proxy markers with actionable messages", () => {
|
||||
expect(formatAccountOperationError(
|
||||
"Account konnte nicht gespeichert werden",
|
||||
new Error("Error invoking remote method: proxy_only_account:proxy_list_missing")
|
||||
)).toBe("Account konnte nicht gespeichert werden: Proxy-only ist aktiviert, aber es ist keine Proxy-Liste hinterlegt. Hinterlege sie unter Einstellungen → Geschwindigkeit.");
|
||||
expect(formatAccountOperationError(
|
||||
"Prüfung fehlgeschlagen",
|
||||
"proxy_only_account:proxy_unreachable"
|
||||
)).toContain("feste API-Proxy ist nicht erreichbar");
|
||||
});
|
||||
|
||||
it("preserves non-proxy account failures", () => {
|
||||
expect(formatAccountOperationError("Prüfung fehlgeschlagen", new Error("Ungültiger API-Key")))
|
||||
.toBe("Prüfung fehlgeschlagen: Error: Ungültiger API-Key");
|
||||
});
|
||||
});
|
||||
|
||||
describe("account dialog filter", () => {
|
||||
const options = [
|
||||
{ id: "rd-api", serviceLabel: "Real-Debrid", title: "Real-Debrid API", modeLabel: "API", pickerDescription: "API-Token" },
|
||||
|
||||
Reference in New Issue
Block a user