website cleanup
This commit is contained in:
@@ -1,14 +1,49 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { LeagueSettingsViewModel } from './LeagueSettingsViewModel';
|
||||
import { DriverSummaryViewModel } from './DriverSummaryViewModel';
|
||||
import type { LeagueConfigFormModel } from '@core/racing/application';
|
||||
import type { LeagueScoringPresetDTO } from '@core/racing/application/ports/LeagueScoringPresetProvider';
|
||||
import type { LeagueConfigFormModel } from '@/lib/types/LeagueConfigFormModel';
|
||||
import type { LeagueScoringPresetDTO } from '@/lib/types/generated/LeagueScoringPresetDTO';
|
||||
|
||||
const createConfig = (overrides: Partial<LeagueConfigFormModel> = {}): LeagueConfigFormModel => ({
|
||||
name: 'Pro League',
|
||||
description: 'Top tier competition',
|
||||
maxDrivers: 40,
|
||||
maxTeams: 10,
|
||||
basics: {
|
||||
name: 'Pro League',
|
||||
description: 'Top tier competition',
|
||||
visibility: 'public',
|
||||
gameId: 'iracing',
|
||||
},
|
||||
structure: {
|
||||
mode: 'solo',
|
||||
maxDrivers: 40,
|
||||
},
|
||||
championships: {
|
||||
enableDriverChampionship: true,
|
||||
enableTeamChampionship: false,
|
||||
enableNationsChampionship: false,
|
||||
enableTrophyChampionship: false,
|
||||
},
|
||||
scoring: {
|
||||
patternId: 'sprint-main-driver',
|
||||
customScoringEnabled: false,
|
||||
},
|
||||
dropPolicy: {
|
||||
strategy: 'bestNResults',
|
||||
n: 6,
|
||||
},
|
||||
timings: {
|
||||
qualifyingMinutes: 30,
|
||||
mainRaceMinutes: 40,
|
||||
roundsPlanned: 8,
|
||||
},
|
||||
stewarding: {
|
||||
decisionMode: 'admin_vote',
|
||||
requireDefense: false,
|
||||
defenseTimeLimit: 24,
|
||||
voteTimeLimit: 48,
|
||||
protestDeadlineHours: 24,
|
||||
stewardingClosesHours: 168,
|
||||
notifyAccusedOnProtest: true,
|
||||
notifyOnVoteRequired: true,
|
||||
},
|
||||
...overrides,
|
||||
} as LeagueConfigFormModel);
|
||||
|
||||
@@ -16,7 +51,10 @@ const createPreset = (overrides: Partial<LeagueScoringPresetDTO> = {}): LeagueSc
|
||||
id: 'preset-1',
|
||||
name: 'Standard scoring',
|
||||
description: 'Top 15 get points',
|
||||
gameId: 'iracing',
|
||||
primaryChampionshipType: 'driver',
|
||||
sessionSummary: 'Sprint + Main',
|
||||
bonusSummary: 'None',
|
||||
dropPolicySummary: 'Best 6',
|
||||
...overrides,
|
||||
} as LeagueScoringPresetDTO);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user