Open NishantUpadhyay-BTC opened 7 years ago
I think this is almost there. On test OfficeUI on Thalia (Staging),I created user "Paul Westfall Test" with email address paul@breitenbush.com. I also verified that no other user accounts exist with this email address. I did not make any reservations for this user. When I visit staging GuestUI on Gozer and attempt new account creation with that email address I get the success message (i.e. "This system has found a guest record that matches your email address..."). When I click "Create" I then get the failure message (i.e. "The guest record associated with this email address appears to have no completed reservations attached to it."). For this case, can the error message display right away - in other words, instead of the success message?
As a further test, I then went back to the test OfficeUI and created and confirmed a reservation for this test user. Going back to the test Guest UI, I then again tried to create the account - which presented the same success and failure messages, which to me verified that the logic is correctly not allowing guest user account creation, since the reservation is not yet completed.
Yet a further test, from test Office UI, I created and confirmed yet another reservation for this test guest, and made it in the past (Nov 1), but did NOT mark the guest as "arrived". Back to the test GuestUI/Account creation, I got the same results, indicating that the logic is still working correctly.
Finally, I went back to the test Office UI and marked the guest as "Arrived" for their Nov 1-2 PR, then went back to test GuestUI and attempted account creation. This resulted in success and I was able to create the new guest user. I did not get the account creation email, but I assume this is because of SMTP settings on test?
Assuming that the email issue is non-blocking, then the only change I have to suggest is to have the failure message appear right off, instead of first presenting the success message per above. Note that we ought to have SMTP working properly for test GuestUI and test OfficeUI for future tests such as these.
Nice work!
We need to add a validation step for new account creation that verifies that the guest record has at least one completed reservation attached (i.e. reservation that is marked as "arrived").
The reason for this is that we require all that users of the GuestUI have been to Breitenbush before. However, Office Team users often create guest records for new guests who, for one reason or another, either don't end up making a reservation or make a reservation that they then cancel. We need to check for these and prevent them from using the GuestUI until they've actually completed a reservation.
On failure, the check should present the message: “The guest record associated with this email address appears to have no completed reservations attached to it. Please call our Reservations Office at 503.854.3320 to complete your first reservation.”