Implement first phase of duo enterprise in-app trials
What does this MR do and why?
Implement first phase of duo enterprise in-app trials. A lot of code used here is copied from duo pro implementation. A lot of work was done to try and DRY up certain areas before this MR in efforts to make the smallest vertical change and can be observed in the execution details of the issue.
- solve for the case of only 1 eligible namespace.
- guard with feature flag to control rollout.
- updates lead forms everywhere with preferred wording since the constants used are shared
- hand raise lead
- user registration for trials
- in-app ultimate trials, duo pro trials and duo enterprise
- see https://gitlab.com/gitlab-org/gitlab/-/issues/468050#note_2023216682
- updates the in-app trials legal/terms as the constants used are shared
- in-app ultimate trials, duo pro trials and duo enterprise
- see https://gitlab.com/gitlab-org/gitlab/-/issues/468050#note_2023216682
- updates the in-app trials button width on all to be auto as the code used is shared
- in-app ultimate trials, duo pro trials and duo enterprise
- see https://gitlab.com/gitlab-org/gitlab/-/issues/468050
What parts of #468050 doesn't this do in order to scope this smaller
- tracking at the controller layer
- benefits/achievement part of UI
- success flash message
These will be covered in a subsequent MR
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
Click to expand
Screen | Before | After |
---|---|---|
duo enterprise trial | N/A | |
duo pro trial | ||
ultimate trial | ||
hand raise lead | ||
form on user registration |
How to set up and validate locally
- Setup GDK to simulate SaaS.
- Enable
duo_enterprise_trials
feature flag inbin/rails console
withFeature.enable(:duo_enterprise_trials)
. - Seed the add-ons for your instance from the terminal if they haven't been created yet(rerun will not harm anything if you do have them)
FILTER=add_ons bundle exec rake db:seed_fu
In-app Duo Enterprise Trials(main goal of this MR)
Click to expand
- Create new group.
- In rails console make it ultimate.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
- Visit
/-/trials/duo_enterprise/new?namespace_id=<group id created>
. - See form. The submission is covered by
feature
specs delivered in this MR that aren't reproducible unless CustomersDot is setup locally.
In-app Duo Pro Trials(form text changes)
Click to expand
- Create new group.
- In rails console make it premium.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'premium'))
- For lead, visit
/-/trials/duo_pro/new
. - For trial, visit
/-/trials/duo_pro/new?step=trial
. - Notice text changes to inputs and terms.
In-app Ultimate Trials(form text changes)
Click to expand
- Create a new group
- Visit
/-/trials/new
. - Notice text changes to inputs and terms.
Hand raise lead(form text changes)
Click to expand
- Navigate to premium group created above and go to
Settings -> Billings
- Click on 'Contact sales.
User registration for trials(form text changes)
Click to expand
- Ensure sign ups are enabled and email confirmation set off.
- Sign up for non SSO(fill in user name and password) with trial(with
/-/trial_registrations/new
path). - Fill in the welcome page and submit.
- Observe the changes in text on the next form as noted in description.
Related to #468050
Edited by Doug Stull