mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 07:38:10 +00:00
add lashing surcharge for cargo types with hasLashing flag
add lashing surcharge for cargo types with hasLashing flag
This commit is contained in:
@@ -234,13 +234,17 @@ describe('TrainSchedulingService', () => {
|
||||
destinationStationId: 'yard-destination',
|
||||
});
|
||||
|
||||
// Availability rows now report what the BOUNDED plan actually uses per
|
||||
// type (never more than stock, so no shortfall on the rows themselves);
|
||||
// the shortage is carried by the deferred bookings' own shortage rows.
|
||||
expect(result.fleetAvailability?.length).toBeGreaterThan(0);
|
||||
expect(result.fleetAvailability?.[0]?.shortfall).toBeGreaterThan(0);
|
||||
expect(
|
||||
result.fleetAvailability?.every((row) => row.needed <= row.available),
|
||||
).toBe(true);
|
||||
expect(result.deferredBookings?.length).toBeGreaterThan(0);
|
||||
expect(result.deferredBookings?.[0]?.reason).toContain('short');
|
||||
expect(result.summary.wagonsNeeded).toBeLessThan(30);
|
||||
expect(result.warnings.some((w) => w.includes('Fleet shortage') || w.includes('deferred'))).toBe(
|
||||
true,
|
||||
);
|
||||
expect(result.warnings.some((w) => w.includes('deferred'))).toBe(true);
|
||||
});
|
||||
|
||||
it('computes slot-based preview for Group A', async () => {
|
||||
|
||||
Reference in New Issue
Block a user