Skip to content

Convert DuoPro trials selection step form to view component

What does this MR do and why?

  • Improved encapsulation and maintainability through isolated testing
  • Remove view logic from controller layer
  • Covered by unit/integration tests and tests in ee/spec/support/shared_examples/components/duo_pro_trial_form_shared_examples.rb

References

Screenshots or screen recordings

No UI changes.

Before After
Screenshot 2025-04-25 at 10.50.45 AM.png

How to set up and validate locally

  1. Setup GDK to simulate SaaS.

  2. Create a new group

  3. Edit the group subscription in the rails console to be on an Premium plan (per ee/app/models/gitlab_subscriptions/duo_pro.rb) or as a shortcut you can edit this in DuoCommon

    def check_trial_eligibility!

    -        return if eligible_for_trial?

    +        return true

    +        # return if eligible_for_trial?

  4. Visit /-/trials/duo_pro/new?step=trial

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #517154 (closed)

Edited by Buck O'Leary

Merge request reports

Loading