Skip to content

Implement first phase of duo enterprise in-app trials

Doug Stull requested to merge 468050-phase-1-duo-enterprise into master

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.

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 Screenshot_2024-07-31_at_9.52.08_AM
duo pro trial Screenshot_2024-07-31_at_9.53.47_AM Screenshot_2024-07-31_at_9.53.13_AM
ultimate trial Screenshot_2024-07-31_at_9.54.58_AM Screenshot_2024-07-31_at_9.55.28_AM
hand raise lead Screenshot_2024-07-31_at_9.59.56_AM Screenshot_2024-07-31_at_9.58.05_AM
form on user registration Screenshot_2024-07-31_at_9.50.30_AM Screenshot_2024-07-31_at_9.45.17_AM

How to set up and validate locally

  1. Setup GDK to simulate SaaS.
  2. Enable duo_enterprise_trials feature flag in bin/rails console with Feature.enable(:duo_enterprise_trials).
  3. 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
  1. Create new group.
  2. In rails console make it ultimate.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
  1. Visit /-/trials/duo_enterprise/new?namespace_id=<group id created>.
  2. 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
  1. Create new group.
  2. In rails console make it premium.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'premium'))
  1. For lead, visit /-/trials/duo_pro/new.
  2. For trial, visit /-/trials/duo_pro/new?step=trial.
  3. Notice text changes to inputs and terms.

In-app Ultimate Trials(form text changes)

Click to expand
  1. Create a new group
  2. Visit /-/trials/new.
  3. Notice text changes to inputs and terms.

Hand raise lead(form text changes)

Click to expand
  1. Navigate to premium group created above and go to Settings -> Billings
  2. Click on 'Contact sales.

User registration for trials(form text changes)

Click to expand
  1. Ensure sign ups are enabled and email confirmation set off.
    • Make sure Admin > Settings > General > Sign Up Restrictions match the below (no admin approval, no email confirmation) Screenshot_2024-07-31_at_9.43.21_AM
  2. Sign up for non SSO(fill in user name and password) with trial(with /-/trial_registrations/new path).
  3. Fill in the welcome page and submit.
  4. Observe the changes in text on the next form as noted in description.

Related to #468050

Edited by Doug Stull

Merge request reports

Loading