feat(planning): ship holiday-aware planning and assistant upgrades
This commit is contained in:
@@ -113,7 +113,7 @@ describe("getRecurringHoursForDay", () => {
|
||||
it("returns 0 before pattern startDate", () => {
|
||||
const patternWithStart: RecurrencePattern = {
|
||||
...weeklyPattern,
|
||||
startDate: new Date("2026-03-16"),
|
||||
startDate: "2026-03-16",
|
||||
};
|
||||
expect(getRecurringHoursForDay(monday, patternWithStart, 8, allocationStart)).toBe(0);
|
||||
});
|
||||
@@ -121,7 +121,7 @@ describe("getRecurringHoursForDay", () => {
|
||||
it("returns 0 after pattern endDate", () => {
|
||||
const patternWithEnd: RecurrencePattern = {
|
||||
...weeklyPattern,
|
||||
endDate: new Date("2026-03-08"),
|
||||
endDate: "2026-03-08",
|
||||
};
|
||||
expect(getRecurringHoursForDay(monday, patternWithEnd, 8, allocationStart)).toBe(0);
|
||||
});
|
||||
@@ -129,8 +129,8 @@ describe("getRecurringHoursForDay", () => {
|
||||
it("returns hours within pattern date bounds", () => {
|
||||
const bounded: RecurrencePattern = {
|
||||
...weeklyPattern,
|
||||
startDate: new Date("2026-03-01"),
|
||||
endDate: new Date("2026-03-31"),
|
||||
startDate: "2026-03-01",
|
||||
endDate: "2026-03-31",
|
||||
};
|
||||
expect(getRecurringHoursForDay(monday, bounded, 8, allocationStart)).toBe(8);
|
||||
});
|
||||
|
||||
@@ -85,12 +85,12 @@ describe("calculateShoringRatio", () => {
|
||||
make("r3", "ES", 4, 10),
|
||||
make("r4", "IN", 8, 10),
|
||||
]);
|
||||
expect(r.byCountry["DE"].resourceCount).toBe(1);
|
||||
expect(r.byCountry["ES"].resourceCount).toBe(2);
|
||||
expect(r.byCountry["IN"].resourceCount).toBe(1);
|
||||
expect(r.byCountry["DE"].hours).toBe(80);
|
||||
expect(r.byCountry["ES"].hours).toBe(120);
|
||||
expect(r.byCountry["IN"].hours).toBe(80);
|
||||
expect(r.byCountry["DE"]!.resourceCount).toBe(1);
|
||||
expect(r.byCountry["ES"]!.resourceCount).toBe(2);
|
||||
expect(r.byCountry["IN"]!.resourceCount).toBe(1);
|
||||
expect(r.byCountry["DE"]!.hours).toBe(80);
|
||||
expect(r.byCountry["ES"]!.hours).toBe(120);
|
||||
expect(r.byCountry["IN"]!.hours).toBe(80);
|
||||
});
|
||||
|
||||
it("exactly at threshold is above", () => {
|
||||
|
||||
Reference in New Issue
Block a user