mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-19 00:52:17 +02:00
fix: preserve the year in default conference end dates
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"core.min.js": "core.6332b3c288.min.js",
|
"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",
|
"mermaid.min.js": "mermaid.f848a72d16.min.js",
|
||||||
"all.min.css": "all.99ce8f3e14.min.css"
|
"all.min.css": "all.99ce8f3e14.min.css"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3484,7 +3484,7 @@ angular
|
|||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setDate(1);
|
start.setDate(1);
|
||||||
start.setMonth(start.getMonth() + 1);
|
start.setMonth(start.getMonth() + 1);
|
||||||
const end = new Date();
|
const end = new Date(start);
|
||||||
end.setMonth(start.getMonth() + 7, 0);
|
end.setMonth(start.getMonth() + 7, 0);
|
||||||
$scope.options = {
|
$scope.options = {
|
||||||
startDate: start,
|
startDate: start,
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -139,4 +139,11 @@ describe("frontend production regressions", function () {
|
|||||||
h.scope.saveDefault(); h.requests.at(-1).reject({ data: { error: "not_connected" } }); await h.flush();
|
h.scope.saveDefault(); h.requests.at(-1).reject({ data: { error: "not_connected" } }); await h.flush();
|
||||||
expect(h.scope.error).to.equal("ERRORS.not_connected");
|
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());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user