Skip to content

Adding error checking to guest reg fragment 4

Matt Brevetti requested to merge issue_306_error_checking_guest_registration into main

License and Copyright Notice

By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).

Branch Name

issue_306_error_checking_guest_registration

Related Issues

Closes #306 (closed)

Description

This merge request will provide checks on the fourth fragment to prevent users from having to perform unnecessary work and from bad data from being entered into the database.

Steps to Test

Updated 12/18

This is my recommended way to test it and hit all the bases. Don't need to be exact. Just try your very very hardest to break the logic and see what happens.

  1. Open AVD and Navigate to the 4th Guest Registration form (Asks about how many people are in your household)
  2. Select 1. Confirm that no other questions appear.
  3. Now select any number greater than 1. Confirm that the next question "Childcare Status" appears.
  4. Before using that field, change the First field back to '1' or 'Select One'. Confirm that the "Childcare" field disappears.
  5. Select a number greater than 2 again so you can see field 2. Select one of the last 3 options and confirm that a 3rd field appears asking about children under 1.
  6. On this field, try to select a number equal to the amount of people in the household. Confirm that you get an error message and that the 'next' button becomes disabled. Do the same thing for a number greater than the amount of people in the household. Confirm the error message appears and the button is still disabled. Do the same thing for a number one less than the number of people in the household and confirm that the next button becomes enabled. Finally, enter a number at least 2 smaller than the number of people in the household. Confirm that a 4th field appears asking about children ages 13months to 5years.
  7. Continue like this. Confirm that you can not enter a number equal to or greater than the number of people in the household. This takes into account all other child fields, so the total amount cannot exceed it.
  8. Play around with changing fields above the one you are currently on. For example, trigger an error on the final field (asking about children under 18) by entering a number too large. Then, change the number of people in the household to 1. Confirm that the button becomes enabled and you can continue. If you go to the summary page, you'll notice that all of the fields asking about children's ages have defaulted to 0 and the field asking about childcare status says "I do not have children".
  9. The same can be done for the "Childcare status" field. Even after entering data in the lower fields, if you changes this to "I do not have children", the fields should hide, button should be enabled (if previously disabled) and summary should show 0 for the ages of all children.

Sorry for the long winded!

Relevant Screenshots

image image image image image image


Notice below, it does not even ask the next question about children once you've hit the max number of people in the household
image


This is if we did not hit max people:
image


When we select "1" for the number of people in the household, summary shows:
image

Relevant Logs

(Paste any relevant logs here.)

Developer Notes

  • as mentioned on the Issue, there is an option to "refuse to answer" the childcare status question. Should we just 0 all of the child age questions and not ask them? Suggest checking with NEST first to see how they handle the situation.
Edited by Richard Kim

Merge request reports