fix: inject the translator for profile save errors

This commit is contained in:
tdurieux
2026-09-06 10:47:53 +02:00
parent 793e926463
commit 681f72f75c
4 changed files with 10 additions and 3 deletions
+6
View File
@@ -133,4 +133,10 @@ describe("frontend production regressions", function () {
const late = harness(); late.defs.statusController.at(-1)(late.scope, late.http, { repoId: "repo" });
late.emit("$destroy"); late.requests[0].resolve({ data: { status: "preparing" } }); await late.flush(); expect(late.timers.size).to.equal(0);
});
it("translates profile save failures", async function () {
const h = harness(); expect(h.defs.profileController).to.include("$translate");
h.defs.profileController.at(-1)(h.scope, h.http, key => Promise.resolve(key));
h.scope.saveDefault(); h.requests.at(-1).reject({ data: { error: "not_connected" } }); await h.flush();
expect(h.scope.error).to.equal("ERRORS.not_connected");
});
});