Skip to content

Convert trial lead step for DuoEnterprise Trial to ViewComponent

What does this MR do and why?

Convert DuoEnterprise trials lead form to a view component

  • Initial step in converting DuoEnterprise trial views to ViewComponents
  • Improved encapsulation and maintainability through isolated testing
  • Remove view logic from controller layer
  • Keeps the param sanitation/permitting in the controller layer.
  • Covered by unit/integration tests and tests in ee/spec/features/gitlab_subscriptions/trials/duo_enterprise/creation_with_
  • see #517152 (closed)

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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

No UI changes / screenshots just to demonstrate that it looks the same after ViewComponent implementation.

Before After
Screenshot_2025-02-25_at_6.47.07_PM Screenshot_2025-02-25_at_6.25.12_PM
Screenshot_2025-02-25_at_6.47.07_PM Screenshot_2025-02-25_at_6.25.30_PM
Screenshot_2025-02-25_at_5.46.24_PM
Screenshot_2025-02-25_at_5.45.27_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Setup GDK to simulate SaaS.
  2. Create a new group
  3. Edit the group subscription in the rails console to be on an Ultimate plan (per ee/app/models/gitlab_subscriptions/duo_enterprise.rb)
  4. Visit /-/trials/duo_enterprise/new

Related to #517152 (closed)

Edited by Buck O'Leary

Merge request reports

Loading