Description
When a user already has a lifetime plan and attempts to purchase an additional one, the current warning message can be misleading. For example, if the user has a total storage limit of 10TB with only 8.1GB used and tries to purchase an additional 5TB plan, the alert incorrectly indicates that the user has 8TB and is about to buy 5TB. This happens because the system is not properly accounting for the existing lifetime plan. Instead, when a user with an active lifetime plan purchases another lifetime plan, the calculation should be based on the sum of the current storage limit and the new storage being added, rather than considering only the new plan in isolation.
Related Issues
Related Pull Requests
Checklist
- Changes have been tested locally.
- Unit tests have been written or updated as necessary.
- The code adheres to the repository's coding standards.
- Relevant documentation has been added or updated.
- No new warnings or errors have been introduced.
- SonarCloud issues have been reviewed and addressed.
- QA Passed
Testing Process
- Log in with a user that already has an active lifetime plan with a known storage limit (e.g., 10TB) and usage (e.g., 8TB used) > Navigate to the Plan tab (Preferences) and select an additional lifetime plan (e.g., +5TB) > Verify that the warning message shown before completing the purchase does not appear.