fix: preserve the year in default conference end dates

This commit is contained in:
tdurieux
2026-09-06 10:47:59 +02:00
parent 681f72f75c
commit 9f00641529
4 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"core.min.js": "core.6332b3c288.min.js",
"vendor.min.js": "vendor.a26a4223c6.min.js",
"vendor.min.js": "vendor.bc507e5015.min.js",
"mermaid.min.js": "mermaid.f848a72d16.min.js",
"all.min.css": "all.99ce8f3e14.min.css"
}
+1 -1
View File
@@ -3484,7 +3484,7 @@ angular
const start = new Date();
start.setDate(1);
start.setMonth(start.getMonth() + 1);
const end = new Date();
const end = new Date(start);
end.setMonth(start.getMonth() + 7, 0);
$scope.options = {
startDate: start,
+1 -1
View File
File diff suppressed because one or more lines are too long
+7
View File
@@ -139,4 +139,11 @@ describe("frontend production regressions", function () {
h.scope.saveDefault(); h.requests.at(-1).reject({ data: { error: "not_connected" } }); await h.flush();
expect(h.scope.error).to.equal("ERRORS.not_connected");
});
it("keeps the conference end date after the start across December", function () {
class December extends Date { constructor(...args) { super(...(args.length ? args : ["2026-12-15T12:00:00Z"])); } }
const h = harness(December); h.scope.user = {};
h.defs.newConferenceController.at(-1)(h.scope, h.http, {}, {});
expect(h.scope.options.startDate.getFullYear()).to.equal(2027);
expect(h.scope.options.endDate.getTime()).to.be.greaterThan(h.scope.options.startDate.getTime());
});
});