Remove dead feature flag setup from remaining Jest specs
What does this MR do and why?
This is the second merge request for issue #630283 (closed). The first merge request, !256955 (merged), covered the security and work item spec areas. This MR covers the remaining files.
This MR removes dead feature-flag setup from 10 Jest spec files. It removes 11 flags. It also removes one unused factory parameter. It makes no application code changes.
A flag counts as dead when two conditions hold. First, it has no YAML
file in config/feature_flags or ee/config/feature_flags. Second,
it has no reference in app, ee/app, lib, ee/lib, config,
ee/config, or jh. The check ran case-insensitively. It allowed an
optional underscore between every character, so no snake_case,
acronym, or digit spelling could hide a flag.
Dead flag setup 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.
Flags removed, by file
ee/spec/frontend/ai/duo_agentic_chat/components/duo_agentic_chat_state_manager_spec.js:aiAgenticWorkflows,duoChatRetryee/spec/frontend/vue_shared/components/notes/system_note_spec.js:saveDescriptionVersionsspec/frontend/admin/projects/index/components/app_spec.js:customAbilityReadAdminProjectsspec/frontend/batch_comments/components/preview_item_spec.js:improvedReviewExperiencespec/frontend/ci/pipeline_editor/components/editor/ci_editor_header_spec.js:aiCiConfigGeneratorspec/frontend/diffs/components/diff_file_spec.js:commentOnFiles, at five call sitesspec/frontend/diffs/components/diff_row_spec.js:dragCommentSelectionspec/frontend/service_accounts/components/create_edit_service_account_modal_spec.js:editServiceAccountEmailspec/frontend/sidebar/components/reviewers/reviewer_title_spec.js:reviewerAssignDrawerspec/frontend/tooltips/index_spec.js:glTooltips
Three edits that go past a one-line delete
A reviewer should look at these three edits.
spec/frontend/admin/projects/index/components/app_spec.jsalso had an unusedfeaturesfactory parameter. No call supplied it. The parameter and the dead flag were the only content of theprovideblock, so the whole block is removed. This file appears in both of the issue's work streams. Both edits are made here, so the file changes only once.spec/frontend/service_accounts/components/create_edit_service_account_modal_spec.jsbuilt the component inside anitblock. The enclosingbeforeEachalready built it with the same arguments once the dead flag was removed. The call in theitblock is removed, instead of left as a duplicate.spec/frontend/tooltips/index_spec.jsset the flag throughwindow.gon.featuresin abeforeEach. That was the only statement in the hook, so the hook is removed. Jest resetsgonbetween tests.
Why removing a provide entry is safe
glFeatureFlagsMixin injects glFeatures with default: () => ({}).
238 components use the mixin. One component injects without a
default,
app/assets/javascripts/vue_shared/components/source_viewer/components/chunk.vue.
No spec in this change mounts it.
Scope note the issue does not yet reflect
The issue lists 18 files for this merge request. This MR does not touch 8 of them, for three reasons.
- Six files under
ee/spec/frontend/ci/runnersetrunnerMaintenanceNoteorrunnerPerformanceInsights. These are licensed features, not feature flags. They are live inee/app/models/gitlab_subscriptions/features.rb, and the runner components read them. The scan wrongly reported them as dead. ee/spec/frontend/ai/duo_agentic_chat/components/prompt_input_actions_spec.jsusesattachmentsOnas a local variable name, not a flag name.spec/frontend/wikis/components/wiki_form_spec.jswas already fixed on the default branch, in commit 12b60f9a.
References
- Issue: #630283 (closed)
- Epic: &23520
- First merge request: !256955 (merged)
Screenshots or screen recordings
This MR changes only spec files. There is no UI change to show.
How to set up and validate locally
There is nothing to set up. This MR changes only spec files. CI runs the Jest suites in both Vue lanes.
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.