Remove dead feature flag setup from work item and security specs
What does this MR do and why?
This MR removes dead feature flag setup from 11 Jest spec files. It does not change any application code.
The MR removes setup for 13 feature flags. Each flag no longer exists. A flag counts as removed only when it has no YAML file in config/feature_flags or ee/config/feature_flags, and no reference in app, ee/app, lib, ee/lib, config, or ee/config. The check ran case-insensitively. It allowed an optional underscore at each word boundary, so a snake_case or acronym spelling could not hide the flag.
Dead flag setup in a spec is misleading. It makes a spec look like the flag drives the component. It does not. A reader can waste time on it. CI cannot catch this, because the tests pass whether the setup stays or goes.
The removed flags, by area:
Security, 5 files:
standaloneVulnDependencyListinee/spec/frontend/dependencies/components/dependency_vulnerability_spec.jsenhancedVulnerabilityBulkActionsandnewIssueAttachmentFromVulnerabilityBulkActioninee/spec/frontend/security_dashboard/components/shared/vulnerability_report/selection_summary_spec.jsvulnerabilityOwaspTop10Groupinee/spec/frontend/security_dashboard/components/shared/vulnerability_report/vulnerability_report_spec.jssecurityPoliciesSpepDryRuninee/spec/frontend/security_orchestration/components/policies/list_component_spec.jsmrSecurityWidgetGraphqlinee/spec/frontend/vue_merge_request_widget/widgets/security_reports/mr_widget_security_reports_spec.js
Work items, 6 files:
notificationsTodosButtonsandworkItemRestApiIndexinee/spec/frontend/integration/work_items/awards/award_emoji_spec.jsworkItemViewForIssuesinee/spec/frontend/integration/work_items/list/preferences_spec.jscreateGroupLevelWorkItemsinee/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.jscreateGroupLevelWorkItemsinspec/frontend/work_items/components/work_item_links/work_item_links_form_spec.jsuseCachedRolledUpWeightsinspec/frontend/work_items/components/work_item_links/work_item_tree_spec.jsworkItemListDisplaySettingsDrawerinspec/frontend/work_items/pages/planning_view_spec.js
Findings for reviewers
-
In both
work_item_links_form_spec.jsfiles, the spec passedglFeaturesinsidepropsData.WorkItemLinksFormusesglFeatureFlagsMixin()and declares noglFeaturesprop. The component never read that value. The setup was wrong twice: the flag was dead, and the mechanism was wrong too. The component readsthis.glFeatures.workItemFeaturesField. The FOSS spec still supplies that value throughprovide. This MR does not touch it. -
In
list_component_spec.js, four calls passedglFeaturesto a factory. The factory does not destructureglFeatures. The value was already dropped. Those four lines did nothing.
Renamed test
In spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js, one test was named requires project selection if group level work item creation is disabled. The flag is gone, so that condition no longer exists. The test still checks real behavior: the Add button stays disabled until a project is selected. This MR renames it to requires project selection when adding a child issue to a group level epic.
Why removing the glFeatures provide entry is safe
glFeatureFlagsMixin injects glFeatures with a default of an empty object. 238 components use the mixin. One component injects glFeatures without a default: app/assets/javascripts/vue_shared/components/source_viewer/components/chunk.vue. No spec in this MR mounts that component.
References
Screenshots or screen recordings
This MR changes only spec files. There is no UI change to show.
How to set up and validate locally
-
Confirm every flag this MR removes is absent from application code.
git grep -nwiE "standalone_?vuln_?dependency_?list|enhanced_?vulnerability_?bulk_?actions|new_?issue_?attachment_?from_?vulnerability_?bulk_?action|vulnerability_?owasp_?top_?10_?group|security_?policies_?spep_?dry_?run|mr_?security_?widget_?graph_?ql|notifications_?todos_?buttons|work_?item_?rest_?api_?index|work_?item_?view_?for_?issues|create_?group_?level_?work_?items|use_?cached_?rolled_?up_?weights|work_?item_?list_?display_?settings_?drawer" -- app ee/app lib ee/lib config ee/config jhThe command returns nothing.
-
Run the changed specs in both lanes.
yarn jest ee/spec/frontend/dependencies/components/dependency_vulnerability_spec.js ee/spec/frontend/integration/work_items ee/spec/frontend/security_dashboard/components/shared/vulnerability_report ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js ee/spec/frontend/vue_merge_request_widget/widgets/security_reports ee/spec/frontend/work_items/components/work_item_links spec/frontend/work_items VUE_VERSION=3 yarn jest spec/frontend/work_items
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.