Cleanup shared class used in free user cap alerts
requested to merge 393901-follow-up-from-draft-removal-free-user-cap-notification-dismissal-and-add-promotion into master
What does this MR do and why?
- removes
Shared
module as it is no longer useful and only provides indirection - moves remaining
Shared
concepts the theFreeUserCap
module.- adds tests
- renames
NonOwnerAlertComponent
toNonOwnerEnforcementAlertComponent
to better convey use. - resolves rubocop issues on files touched
- removes use of
let_it_be
for non expensive test operations
How to set up and validate locally
- Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK
bin/rails c
ApplicationSetting.first.update(dashboard_limit_enabled: false)
Feature.disable(:free_user_cap)
Feature.disable(:free_user_cap_new_namespaces)
Feature.disable(:preview_free_user_cap)
- Sign in as free user. Create private group and private project inside.
- Add 4 members.
bin/rails c
ApplicationSetting.first.update(dashboard_limit_enabled: true, dashboard_notification_limit: 3, dashboard_limit: 5, dashboard_enforcement_limit: 10)
Feature.enable(:preview_free_user_cap)
- Go to the group info page. Check alert and see it doesn't match this one and is the owner alert.
- Sign out. Sign in as another group member that is not an owner.
- Go to the group info page. Check alert is present, but has wording matching our change here.
- Go to the project info page. Check alert is not present., but has wording matching our change here
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #393901 (closed)
Edited by Doug Stull