Add Unlimited Members During Trial Alert component
What does this MR do and why?
- Convert existing Unlimited Members trial alert partial content to ViewComponent
- Moves show_unlimited_members_during_trial_alert? and members_page? into component
- Adds RSpec tests for new UnlimitedMembersDuringTrialAlertComponent
- Adds RSpec test for previously untested method in GroupCalloutsHelper
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
Appearance / UI is unchanged - code has just been moved into component.
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.
- Launch local GDK to simulate saas
- Setup active trial for namespace owned by signed-in user via the console (optional create new group and make your user the owner a la below)
bin/rails c
namespace = Group.last
namespace.owner_id = User.first.id # if needed / you need to be the owner of the namespace
gitlab_subscription = namespace.gitlab_subscription # find or create a new one if needed
gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'), trial: true, trial_ends_on: Date.today + 15)
- Navigate to any group and project under the namespace owned by the signed-in user
Note: To skip setting up the trial for a namespace / step 2 locally, go to the file ee/app/helpers/ee/users/group_callouts_helper.rb and replace group.trial_active? with true.
Related to #405016 (closed)


