Add Duo Pro end trial widget
What does this MR do and why?
Add an end trial widget experience for expired Duo Pro trials.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Existing active widget | New expired widget |
---|---|
How to set up and validate locally
- Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK
- Sign out. Sign up and create new group during sign up or afterwards.
bin/rails c
Feature.enable(:duo_pro_trial_expired_widget)
GitlabSubscriptions::AddOn.find_or_create_by(name: 'code_suggestions', description: GitlabSubscriptions::AddOn.descriptions[:code_suggestions])
GitlabSubscription.last.update(trial: true, trial_starts_on: 45.days.ago, trial_ends_on: 15.days.ago)
GitlabSubscriptions::AddOnPurchase.create(subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: 'code_suggestions').id, namespace: Group.last, organization_id: 1, started_at: 60.days.ago, expires_on: Date.today, trial: true, quantity: 1, purchase_xid: '1')
- Visit group page. Make sure you can see active Duo Pro trial widget.
bin/rails c
GitlabSubscriptions::AddOnPurchase.last.update(expires_on: 10.days.ago)
- Reload page. Make sure you cannot see Duo Pro trial widget.
bin/rails c
GitlabSubscription.last.update(trial_starts_on: 101.days.ago, trial_ends_on: 71.days.ago)
- Reload page. Make sure you can see expired Duo Pro trial widget.
- Click widget.
- Hover widget. Click
Purchase now
. Go back. - Hover widget. Click
Contact sales
. Close form. - Hover widget. Click
Learn about Duo Pro
. - Mare sure frontend events are generated.
- Click dismiss button. Make sure the widget is dismissed.
- Reload the page. Make sure the widget is dismissed.
Event Tracking Requirements
sequence | activity | category | action | label |
---|---|---|---|---|
1 | Duo Pro end trial status widget is clicked | trial_ended_widget |
click_link |
duo_pro_trial |
2 | Duo Pro end Trial status popover is rendered | duo_pro_trial_ended_popover |
render_popover |
|
3 |
Buy now is clicked in trial ended popover and user is directed to GitLab Duo Pro Add-on tab in /usage_quotas page |
duo_pro_trial_ended_popover |
click_button |
purchase_now |
4 |
Contact Sales button is clicked in Duo Pro trial ended popover and Duo Pro hand-raise PQL modal is opened |
duo_pro_trial_ended_popover |
click_button |
contact_sales |
5 | 'Learn more about feature` text link in Duo Pro Active Trial Status widget is clicked and user is directed to Duo Pro page on marketing site | duo_pro_trial_ended_popover |
click_button |
learn_about_duo_pro |
Related to #455881
Edited by Serhii Yarynovskyi