Don't send empty string as quantity
What does this MR do and why?
The Storage purchase flow is blocked if user sets 0 in the quantity input. It happens because internally we don't set 0
but an empty string. This MR fixes it.
Related to #351204 (closed)
Screenshots or screen recordings
Before | After |
---|---|
Even if the input is valid again the flow is blocked Screen_Recording_2022-01-26_at_11.53.14 | Screen_Recording_2022-01-26_at_11.51.07 |
How to set up and validate locally
- Run CustomersDot and GitLab locally
- On your local GitLab instance enable a feature toggle
- Run
rails c
- Run
Feature.enable(:new_route_storage_purchase)
to enable the feature flag for Storage flow - Make sure that you have correct settings
Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
- Open any existing group page and navigate to Settings -> Usage Quotas -> Storage click “Purchase more storage” OR use a fast forward link http://localhost:3000/-/subscriptions/buy_storage?selected_group=<id_of_an_existing_group>
- Check that you could delete a value in the quantity input, add again and the flow still will be functional
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Diana Zubova