Prevent premature completed state on Billing Address
Re-work of !139603 (merged)
Related to #434902 (closed)
Adds logic to only show a green check next to completed steps that have already been accessed. Previously, we were showing a green check next to Contact information
before the user had accessed that step because no action was needed.
Implements a way to keep track of the furthest step so that we can determine if the user has already accessed the step or not.
Screenshots or screen recordings
New subscription | Add on |
---|---|
purchase_flow_with_correct_check_marks | add_on_subscription |
Subscription details | Contact information | Payment method | Completed |
---|---|---|---|
How to set up and validate locally
- Enable the feature flag
Feature.enable(:key_contacts_management_v2, type: :gitlab_com_derisk)
- Have CustomersDot set up and connected to GitLab
- Visit
http://localhost:3000/-/subscriptions/new?plan_id=2c92c0f876e0f4cc0176e176a08f1b70
(new subscription) - Go through the form,
- Hit
next
as well asedit
buttons to ensure the form works as expected - Visit
http://localhost:3000/-/subscriptions/buy_minutes?selected_group=GROUP_ID_HERE
and test the same logic (add-on form) - Disable the feature flag
Feature.disable(:key_contacts_management_v2, type: :gitlab_com_derisk)
- Verify the form still works as expected
Edited by Laura Callahan