From 73955ffd240aaf39a7a27ea390acdd6d859bda9d Mon Sep 17 00:00:00 2001 From: Collin Duncan <3679940+cgduncan7@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:43:52 +0200 Subject: [PATCH] Fixing how waiting list entries are confirmed --- src/runner/baanreserveren/service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runner/baanreserveren/service.ts b/src/runner/baanreserveren/service.ts index ca077e6..02a3075 100644 --- a/src/runner/baanreserveren/service.ts +++ b/src/runner/baanreserveren/service.ts @@ -201,6 +201,7 @@ export class BaanReserverenService { .catch((e) => { throw new RunnerWaitingListNavigationError(e) }) + await this.page.waitForNetworkIdle() } private async navigateToReservations() { @@ -210,6 +211,7 @@ export class BaanReserverenService { .catch((e) => { throw new RunnerWaitingListNavigationError(e) }) + await this.page.waitForNetworkIdle() } private async recordWaitingListEntries(): Promise { @@ -273,6 +275,7 @@ export class BaanReserverenService { await this.page.goto( `${BAAN_RESERVEREN_ROOT_URL}/${BaanReserverenUrls.WaitingListAdd}`, ) + await this.page.waitForNetworkIdle() } private async selectAvailableTime(reservation: Reservation) { @@ -392,6 +395,7 @@ export class BaanReserverenService { await saveButton?.click().catch((e) => { throw new RunnerWaitingListConfirmError(e) }) + await this.page.waitForNetworkIdle() } public async performReservation(reservation: Reservation) { @@ -409,6 +413,7 @@ export class BaanReserverenService { await this.openWaitingListDialog() await this.inputWaitingListDetails(reservation) await this.confirmWaitingListDetails() + await this.navigateToWaitingList() const currentWaitingListIds = await this.recordWaitingListEntries() const waitingListId = this.findNewWaitingListEntryId( previousWaitingListIds,