clean routes

This commit is contained in:
2026-01-03 02:42:47 +01:00
parent 07985fb8f1
commit 2f21dc4595
107 changed files with 7596 additions and 3401 deletions

View File

@@ -71,10 +71,13 @@ export class RacingSeasonSponsorshipFactory {
let participantCount: number | undefined;
let maxDrivers: number | undefined;
// Special case: ensure league-5-season-1 starts unpublished for test compatibility
const isTestSeason = id === seedId('league-5-season-1', this.persistence);
switch (status) {
case 'planned':
startDate = this.daysFromBase(faker.number.int({ min: 7, max: 90 }));
schedulePublished = faker.datatype.boolean({ probability: 0.6 });
schedulePublished = isTestSeason ? false : faker.datatype.boolean({ probability: 0.6 });
participantCount = 0;
break;
@@ -113,7 +116,7 @@ export class RacingSeasonSponsorshipFactory {
case 'cancelled':
startDate = this.daysFromBase(faker.number.int({ min: -30, max: -1 }));
endDate = this.daysFromBase(faker.number.int({ min: -1, max: 1 })); // Cancelled early
schedulePublished = faker.datatype.boolean({ probability: 0.3 });
schedulePublished = isTestSeason ? false : faker.datatype.boolean({ probability: 0.3 });
// Cancelled seasons can have maxDrivers but participantCount should be low
maxDrivers = faker.number.int({
min: 5,