feat(stats): show work and time-off lengths (#66)

This commit is contained in:
nessar committed 2026-10-07 22:39:05 +02:00
1 parent d9f3f8d34a
commit 3fbf9c3172
12 files changed
+373 -20

No files matched your search

@@ -197,6 +197,13 @@ parentPort.on('message', (data) => globalThis.self.onmessage({ data }));
: undefined;
if (!plan) throw new Error('Expected a valid earned-chain plan.');
expect(plan.calculationDate).toBe('2024-05-01');
expect(plan.metrics).toMatchObject({
nonWorkingDayGain: 5,
averageWorkSequence: 1,
longestWorkSequence: 1,
averageTimeOffPeriod: 4.5,
longestTimeOffPeriod: 5,
});
expect(plan.placements).toMatchObject([
{
date: '2024-05-03',
@@ -250,6 +257,7 @@ parentPort.on('message', (data) => globalThis.self.onmessage({ data }));
throw new Error(`Expected the same direct plan: ${JSON.stringify(direct)}`);
expect(plan.placements).toEqual(direct.placements);
expect(plan.ifThenContributions).toEqual(direct.ifThenContributions);
expect(plan.metrics).toEqual(direct.metrics);
const root: HTMLElement = fixture.nativeElement;
expect(root.textContent).toContain('Droit futur généré');
expect(root.textContent).toContain('CP autour du férié');