Test Scenario for Adding a Beneficiary:
Test Case 1: Adding a New Beneficiary (if the first name and last name have at least 2 characters).
Expected Outcome: The beneficiary should be added successfully.
Test Case 2: Adding a New Beneficiary (for an existing beneficiary if the last name and TIN match).
Expected Outcome: A pop-up should appear indicating that the beneficiary already exists.
Test Case 3: Adding a New Beneficiary (for a non-existing beneficiary if the last name, dob, and TIN match).
Expected Outcome: The beneficiary should be added successfully.
Test Case 4: Adding a New Beneficiary (for a non-existing beneficiary if the last name or dob or TIN do not match).
Expected Outcome: The beneficiary should not be added, and a pop-up should appear advising the user to contact support.
Test Case 5: Deleting the same beneficiary from two different accounts of the user.
Expected Outcome: If two accounts of a user have the same beneficiary, then deleting the beneficiary from one account should only remove it from that account, not from the other.
Test Case 6: Adding a New Beneficiary (If the last name, date of birth (DOB), and TIN match for a non-existing beneficiary, but the first name is entered differently).
Expected Outcome: The beneficiary should be added successfully. The first name displayed on the success popup page should be the first name that was stored when the beneficiary was first added, not the first name that was just entered on the form page.
Test Case 7: Adding a New Beneficiary (If we enter numbers, special characters, or only spaces in the first name or last name on the form page).
Expected Outcome: An error should be displayed for the first name and last name fields, indicating that special characters, spaces only, and numbers are not allowed in this field.
Test Case 8: Adding a New Beneficiary (When entering the SSN, if the SSN is in the SSN list or if the SSN length is less than 9 on the form page).
Expected Outcome: An error should be displayed for the SSN if the entered SSN length is less than 9 digits, stating ‘This field is required and should be 9 digits.’ If the SSN is in the SSN list, the error message should be ‘Invalid Social Security Number.’
Test Case 9: Adding a New Beneficiary (when entering the invalid dob).
Expected Outcome: An error should be displayed if the date of birth (DOB) is before the year 1899, in the future, or if an invalid DOB is entered, with a message indicating ‘Invalid DOB’.
Test Case 10: Adding a New Beneficiary (If the user wants to add a new beneficiary even though the account already has 5 beneficiaries).
Expected Outcome: A pop-up should appear showing: ‘You have reached the maximum of 5 beneficiaries allowed for this account. Please go back to manage your beneficiaries.’