Adjust show_code_suggestions_tab? to use code_suggestions_available?
What does this MR do and why?
In this MR we adjust show_code_suggestions_tab?
to:
- Use
code_suggestions_available?
- Remove
Gitlab.com?
and use Sass feature check instead - Adjust the specs
How to set up and validate locally
Go to any group page, enable/disable the feature flags, and check the code_sugegstions
tab on the usage quota page for SaaS.
On SaaS, pick a group:
gdk stop rails-web && GITLAB_RAILS_RACK_TIMEOUT_ENABLE_LOGGING=false PUMA_SINGLE_MODE=true GITLAB_SIMULATE_SAAS=1 gdk rails s
-
Feature.enable(:hamilton_seat_management)
# Check example http://gdk.test:3000/groups/gitlab-instance-3513b16a/-/usage_quotas#seats-quota-tab -
Feature.disable(:hamilton_seat_management)
# Check example http://gdk.test:3000/groups/gitlab-instance-3513b16a/-/usage_quotas#seats-quota-tab
On SM, pick a group: verify that the code suggestions tab is not showing.
gdk stop rails-web && GITLAB_RAILS_RACK_TIMEOUT_ENABLE_LOGGING=false PUMA_SINGLE_MODE=true GITLAB_SIMULATE_SAAS=0 gdk rails s
-
Feature.enable(:self_managed_code_suggestions)
# Check example On a [not paid plan](https://gdk.test:3000/groups/gitlab-instance-3513b16a/-/usage_quotas#seats-quota-tab
Note: Wait a couple of seconds after each enable/disable.
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 #433011
Edited by Mohamed Hamda