From a0405e70277bbcf52dc811c34b95e5e383a39e8b Mon Sep 17 00:00:00 2001 From: Collin Duncan <3679940+cgduncan7@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:49:33 +0200 Subject: [PATCH] Decreasing priority of court 2 because team reserves it :sad: --- src/runner/baanreserveren/service.ts | 2 +- test/unit/baanreserveren/service.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runner/baanreserveren/service.ts b/src/runner/baanreserveren/service.ts index 3a6e45c..3c43473 100644 --- a/src/runner/baanreserveren/service.ts +++ b/src/runner/baanreserveren/service.ts @@ -68,7 +68,7 @@ const CourtSlotToNumber: Record = { // Lower is better const CourtRank: Record = { [CourtSlot.One]: 2, - [CourtSlot.Two]: 0, + [CourtSlot.Two]: 1, // team at squash city has this pre-booked at 19.15 on Tuesday :sad: [CourtSlot.Three]: 1, // team at squash city has this pre-booked at 19.15 on Tuesday :sad: [CourtSlot.Four]: 0, [CourtSlot.Five]: 99, // shitty diff --git a/test/unit/baanreserveren/service.spec.ts b/test/unit/baanreserveren/service.spec.ts index fc1f12f..0219c24 100644 --- a/test/unit/baanreserveren/service.spec.ts +++ b/test/unit/baanreserveren/service.spec.ts @@ -57,7 +57,7 @@ describe('baanreserveren.service', () => { describe('performSpeedyReservation', () => { it.each([ [18, 15, CourtSlot.Seven, CourtSlot.Six], - [18, 30, CourtSlot.Two, CourtSlot.Four], + [18, 30, CourtSlot.Four, CourtSlot.Two], [18, 45, CourtSlot.Twelve, CourtSlot.Thirteen], ])( 'should try highest ranked court first', @@ -90,7 +90,7 @@ describe('baanreserveren.service', () => { it.each([ [18, 15, CourtSlot.Seven, CourtSlot.Eight], - [18, 30, CourtSlot.Two, CourtSlot.Four], + [18, 30, CourtSlot.Four, CourtSlot.Two], [18, 45, CourtSlot.Twelve, CourtSlot.Thirteen], ])( 'should try backup if first rank is taken',