Rename schedule fixtures for better readability of tests

This commit is contained in:
Romain Thouvenin 2024-04-05 11:43:30 +02:00
parent 0dc01da2b0
commit 173e5ebba5
1 changed files with 29 additions and 29 deletions

View File

@ -37,7 +37,7 @@ const waypointsSet2: PointProps[] = [
},
];
const schedule1: ScheduleItemProps[] = [
const mondayAt7: ScheduleItemProps[] = [
{
day: 1,
time: '07:00',
@ -45,7 +45,7 @@ const schedule1: ScheduleItemProps[] = [
},
];
const schedule2: ScheduleItemProps[] = [
const mondayAt710: ScheduleItemProps[] = [
{
day: 1,
time: '07:10',
@ -53,7 +53,7 @@ const schedule2: ScheduleItemProps[] = [
},
];
const schedule3: ScheduleItemProps[] = [
const weekdayMornings: ScheduleItemProps[] = [
{
day: 1,
time: '06:30',
@ -81,7 +81,7 @@ const schedule3: ScheduleItemProps[] = [
},
];
const schedule4: ScheduleItemProps[] = [
const schooldayMornings: ScheduleItemProps[] = [
{
day: 1,
time: '06:50',
@ -104,7 +104,7 @@ const schedule4: ScheduleItemProps[] = [
},
];
const schedule5: ScheduleItemProps[] = [
const saturdayNightAndMondayMorning: ScheduleItemProps[] = [
{
day: 0,
time: '00:02',
@ -117,7 +117,7 @@ const schedule5: ScheduleItemProps[] = [
},
];
const schedule6: ScheduleItemProps[] = [
const mondayAndSaturdayNights: ScheduleItemProps[] = [
{
day: 1,
time: '23:10',
@ -130,7 +130,7 @@ const schedule6: ScheduleItemProps[] = [
},
];
const schedule7: ScheduleItemProps[] = [
const thursdayEvening: ScheduleItemProps[] = [
{
day: 4,
time: '19:00',
@ -266,8 +266,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
});
expect(candidateEntity.id.length).toBe(36);
@ -286,8 +286,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
}).setCarpoolPath(carpoolPath1);
expect(candidateEntity.getProps().carpoolPath).toHaveLength(2);
@ -306,8 +306,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
}).setMetrics(352688, 14587);
expect(candidateEntity.getProps().distance).toBe(352688);
@ -328,8 +328,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
}).setMetrics(458690, 13980);
expect(candidateEntity.isDetourValid()).toBeFalsy();
@ -347,8 +347,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
}).setMetrics(352368, 18314);
expect(candidateEntity.isDetourValid()).toBeFalsy();
@ -369,8 +369,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule2,
driverSchedule: mondayAt7,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)
@ -392,7 +392,7 @@ describe('Candidate entity', () => {
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: undefined,
passengerSchedule: schedule2,
passengerSchedule: mondayAt710,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)
@ -424,7 +424,7 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
driverSchedule: mondayAt7,
passengerSchedule: undefined,
spacetimeDetourRatio,
})
@ -480,8 +480,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule3,
passengerSchedule: schedule4,
driverSchedule: weekdayMornings,
passengerSchedule: schooldayMornings,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)
@ -517,8 +517,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule5,
passengerSchedule: schedule6,
driverSchedule: saturdayNightAndMondayMorning,
passengerSchedule: mondayAndSaturdayNights,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)
@ -564,8 +564,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule7,
driverSchedule: mondayAt7,
passengerSchedule: thursdayEvening,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)
@ -588,8 +588,8 @@ describe('Candidate entity', () => {
passengerWaypoints: waypointsSet2,
driverDistance: 350145,
driverDuration: 13548,
driverSchedule: schedule1,
passengerSchedule: schedule7,
driverSchedule: mondayAt7,
passengerSchedule: thursdayEvening,
spacetimeDetourRatio,
})
.setCarpoolPath(carpoolPath2)