Don't show integrations overrides tab at group level
What does this MR do?
Follow-up to !66995 (merged) (for #218252 (closed)), currently behind the instance_level_integration_overrides
feature flag (disabled by default, #336750 (closed)).
This MR fixes a bug where the instance-level overrides link was being shown on group-level integrations; there should be no tabs at the group-level.
Instance and group-level integrations pages share the same haml templates, so a check for integration.instance_level?
has been added for this link, and test coverage at the group level.
Screenshots or Screencasts (strongly suggested)
Before (group-level) | After (group-level) |
---|---|
(optional) How to setup and validate locally (strongly suggested)
-
Enable the feature
Feature.enable(:instance_level_integration_overrides)
-
Visit a project's Campfire integration setting page such as
http://127.0.0.1:3000/flightjs/flight/-/services/campfire/edit
. -
Enter anything into the "Campfire token" field and save.
-
Visit the instance admin's Campfire integration setting page
http://127.0.0.1:3000/admin/application_settings/integrations/campfire/edit
. -
Click the "Projects using custom settings" tab.
-
The project should appear in the list.
-
Click the "Settings" tab now.
-
Enter a different "Campfire token" into the field and save. A modal will appear. Click save.
-
Visit the same project's Campfire integration setting page again such as
http://127.0.0.1:3000/flightjs/flight/-/services/campfire/edit
. -
Change the drop-down from "Use custom settings" to "Use default settings".
-
Click save.
-
Visit the instance admin's "Projects using custom settings" page again
http://127.0.0.1:3000/admin/application_settings/integrations/campfire/overrides
. -
The project should no longer appear in the list.
Repeat for group-level integrations to test group level.