Adding Why Duo? section to Duo Pro Trial Discover page
What does this MR do and why?
Adds the "Why Gitlab Duo?" section to the new Duo Pro trial discover page.
Adding header text check for Why Duo? to Discover Pro Show page spec - hoping for help in MR with making sure the tracking and locale related items are correct (and of course a review of the front-end implementation / making sure I have correct spacing would be helpful as well.)
Moved additional items to threads in MR per feedback from GDoud and team.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. [X] 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.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Make Duo Pro Discover show page available by following the steps in @jmontal's initial MR. Re-posting rails console commands for clarity / ease here:
bin/rails c
Feature.enable(:duo_pro_trials)
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, started_at: 60.days.ago, expires_on: Date.today, trial: true, quantity: 1, purchase_xid: '1')
- Caveats / Troubleshooting - depending on your current local environment you may need to create additional resources for those rails console commands to execute successfully (I believe I needed to create a GitlabSubscription in the console as well.)
If you're impatient and those steps don't fully get you there, you should also be able to force the rendering of the Duo Pro Discover page by modifying the following file like so - although be careful not to commit it.
ee/app/models/gitlab_subscriptions/trials/duo_pro.rb
def self.show_duo_pro_discover?(namespace, user)
+ return true
return false unless namespace.present?
return false unless user.present?
- Start the GDK and navigate to http://localhost:3000/groups/#{your-test-group}/-/add_ons/discover_duo_pro
@gdoud, @p_cordero - mentioning yall for visibility.
Related to #462651