and-murray / wharf-spaces

MIT License
1 stars 0 forks source link

Bugfix: Can continue booking parking spaces after you've already booked one #74

Open SeanSmithAND opened 1 week ago

SeanSmithAND commented 1 week ago

Description

I was able to press the "Book" CTA more than once after pressing it a first time. This resulted in me booking a space, and then being entered multiple times into the waiting list.

Prerequisites

For context, I was walking through the centre of Leeds whilst booking my parking space. There is a good chance this limited my network and causes a race condition which resulted in this bug. To replicate it might be useful to throttle your network.

To clarify, this is just my assumption.

Steps to Reproduce

  1. Open Wharf Spaces App.
  2. Navigate to a date that has empty spaces to book on parking.
  3. Click the "Book" CTA.
  4. After the loading spinner has disappeared but before the "Who's parking?" section has updated, press the "Book" CTA again.
  5. Do this as many times as possible.

Expected Result

After pressing the "Book" CTA for the first time, the user shouldn't that CTA. They should see the "Cancel" CTA.

Actual Result

After pressing the "Book" CTA I was able to press it many times before the Cancel CTA rendered. This result in me being placed in the Waiting list many times.