Fixup Feature Flags Link in Search Bar Results
What does this MR do?
This MR makes a few small fixes related to the search bar widget:
- Display the "In this project: Feature Flags" link in CE. This was only appearing in EE.
- Do not display the "In this project: Feature Flags" link if the user does not have access to feature flags (if the user is a reporter). The link would appear even for reporters in EE, so the user would get a 404 when clicking the link.
- Fix a bug where the "In this project: Feature Flags" link does not appear in EE when the user has access if the project repository permission settings are
PRIVATE
. - Refactor
spec/features/search/user_uses_header_search_field_spec.rb
to uselet_it_be
. - Refactor the js testing selector,
.js-dashboard-search-options
, to use a data-testid instead,data-testid=dashboard-search-options
. - Fix a quarantined spec in
spec/features/global_search_spec.rb
.
Issue: #250352 (closed)
Also fixes: #201841 (closed)
Screenshots
A reporter does not see the "In this project: Feature Flags" link:
A developer sees the "In this project: Feature Flags" link:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Jason Goodman