From 6c96c70b2819dce62a19574931b813eee39a5e14 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Tue, 13 May 2025 13:35:29 +0100 Subject: [PATCH] Remove the `full-project-search` split test (#25444) GitOrigin-RevId: b36c1c81152694547dcf044cfb2cb0f511bfdc22 --- .../app/src/Features/Project/ProjectController.js | 1 - .../components/codemirror-search-form.tsx | 5 +---- .../components/full-project-search-button.tsx | 2 +- .../frontend/js/shared/context/layout-context.tsx | 15 ++++++--------- .../components/codemirror-editor.spec.tsx | 7 +++++++ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 1e92a55519..160914db81 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -335,7 +335,6 @@ const _ProjectController = { const splitTests = [ 'compile-log-events', 'external-socket-heartbeat', - 'full-project-search', 'null-test-share-modal', 'populate-clsi-cache', 'pdf-caching-cached-url-lookup', diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx index c013dcdb42..90a968add6 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx @@ -29,7 +29,6 @@ import MaterialIcon from '@/shared/components/material-icon' import OLButtonGroup from '@/features/ui/components/ol/ol-button-group' import OLFormControl from '@/features/ui/components/ol/ol-form-control' import OLCloseButton from '@/features/ui/components/ol/ol-close-button' -import { isSplitTestEnabled } from '@/utils/splitTestUtils' import { useTranslation } from 'react-i18next' import classnames from 'classnames' import { useUserSettingsContext } from '@/shared/context/user-settings-context' @@ -444,9 +443,7 @@ const CodeMirrorSearchForm: FC = () => { - {!newEditor && isSplitTestEnabled('full-project-search') && ( - - )} + {!newEditor && } {position !== null && (
diff --git a/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx b/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx index e4e77c5859..235a4428f3 100644 --- a/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx +++ b/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx @@ -80,7 +80,7 @@ export const FullProjectSearchButton = ({ query }: { query: SearchQuery }) => { diff --git a/services/web/frontend/js/shared/context/layout-context.tsx b/services/web/frontend/js/shared/context/layout-context.tsx index bcd0167812..e82dcbc350 100644 --- a/services/web/frontend/js/shared/context/layout-context.tsx +++ b/services/web/frontend/js/shared/context/layout-context.tsx @@ -18,7 +18,6 @@ import { debugConsole } from '@/utils/debugging' import { BinaryFile } from '@/features/file-view/types/binary-file' import useScopeEventEmitter from '@/shared/hooks/use-scope-event-emitter' import useEventListener from '@/shared/hooks/use-event-listener' -import { isSplitTestEnabled } from '@/utils/splitTestUtils' import { isMac } from '@/shared/utils/os' import { sendSearchEvent } from '@/features/event-tracking/search-events' import { useRailContext } from '@/features/ide-redesign/contexts/rail-context' @@ -161,14 +160,12 @@ export const LayoutProvider: FC = ({ children }) => { event.shiftKey && event.code === 'KeyF' ) { - if (isSplitTestEnabled('full-project-search')) { - event.preventDefault() - sendSearchEvent('search-open', { - searchType: 'full-project', - method: 'keyboard', - }) - setProjectSearchIsOpen(true) - } + event.preventDefault() + sendSearchEvent('search-open', { + searchType: 'full-project', + method: 'keyboard', + }) + setProjectSearchIsOpen(true) } }, []) ) diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor.spec.tsx index f3618af615..40693c2ec1 100644 --- a/services/web/test/frontend/features/source-editor/components/codemirror-editor.spec.tsx +++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor.spec.tsx @@ -13,6 +13,8 @@ describe('', { scrollBehavior: false }, function () { beforeEach(function () { window.metaAttributesCache.set('ol-preventCompileOnLoad', true) cy.interceptEvents() + cy.intercept('GET', '/project/*/changes/users', []) + cy.intercept('GET', '/project/*/threads', {}) }) it('deletes selected text on Backspace', function () { @@ -519,6 +521,9 @@ describe('', { scrollBehavior: false }, function () { cy.findByLabelText('Within selection').as('within-selection-label') cy.findByRole('button', { name: 'Replace' }).as('replace') cy.findByRole('button', { name: 'Replace All' }).as('replace-all') + cy.findByRole('button', { name: 'Search all project files' }).as( + 'search-project' + ) cy.findByRole('button', { name: 'previous' }).as('find-previous') cy.findByRole('button', { name: 'next' }).as('find-next') cy.findByRole('button', { name: 'Close' }).as('close') @@ -532,6 +537,7 @@ describe('', { scrollBehavior: false }, function () { cy.get('@within-selection').should('be.focused').tab() cy.get('@find-previous').should('be.focused').tab() cy.get('@find-next').should('be.focused').tab() + cy.get('@search-project').should('be.focused').tab() cy.get('@replace').should('be.focused').tab() cy.get('@replace-all').should('be.focused').tab() @@ -539,6 +545,7 @@ describe('', { scrollBehavior: false }, function () { cy.get('@close').should('be.focused').tab({ shift: true }) cy.get('@replace-all').should('be.focused').tab({ shift: true }) cy.get('@replace').should('be.focused').tab({ shift: true }) + cy.get('@search-project').should('be.focused').tab({ shift: true }) cy.get('@find-next').should('be.focused').tab({ shift: true }) cy.get('@find-previous').should('be.focused').tab({ shift: true }) cy.get('@within-selection').should('be.focused').tab({ shift: true })