mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 21:58:57 +02:00
fix: inject the translator for profile save errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"core.min.js": "core.6332b3c288.min.js",
|
||||
"vendor.min.js": "vendor.57674ce30d.min.js",
|
||||
"vendor.min.js": "vendor.a26a4223c6.min.js",
|
||||
"mermaid.min.js": "mermaid.f848a72d16.min.js",
|
||||
"all.min.css": "all.99ce8f3e14.min.css"
|
||||
}
|
||||
|
||||
@@ -1138,7 +1138,8 @@ angular
|
||||
.controller("profileController", [
|
||||
"$scope",
|
||||
"$http",
|
||||
function ($scope, $http) {
|
||||
"$translate",
|
||||
function ($scope, $http, $translate) {
|
||||
$scope.terms = "";
|
||||
$scope.options = {
|
||||
expirationMode: "remove",
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user