From 3d423813378002daf2e3a2d23ecd75288331d859 Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:02:07 +0100 Subject: [PATCH] Merge pull request #18918 from overleaf/dp-swap-search-arrows Swap order of next/previous arrows in editor search GitOrigin-RevId: 2c402e177fcd679ebff8e96812faf09d493e9726 --- .../components/codemirror-search-form.tsx | 16 ++++++++-------- .../components/codemirror-editor.spec.tsx | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) 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 74a406cdbb..ad406bf724 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 @@ -405,14 +405,6 @@ const CodeMirrorSearchForm: FC = () => {
- - + + {position !== null && ( 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 c12b59285c..707444d87d 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 @@ -505,8 +505,8 @@ 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: 'next' }).as('find-next') cy.findByRole('button', { name: 'previous' }).as('find-previous') + cy.findByRole('button', { name: 'next' }).as('find-next') cy.findByRole('button', { name: 'Close' }).as('close') // Tab forwards... @@ -516,8 +516,8 @@ describe('', { scrollBehavior: false }, function () { cy.get('@regexp').should('be.focused').tab() cy.get('@whole-word').should('be.focused').tab() cy.get('@within-selection').should('be.focused').tab() - cy.get('@find-next').should('be.focused').tab() cy.get('@find-previous').should('be.focused').tab() + cy.get('@find-next').should('be.focused').tab() cy.get('@replace').should('be.focused').tab() cy.get('@replace-all').should('be.focused').tab() @@ -525,8 +525,8 @@ 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('@find-previous').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 }) cy.get('@whole-word').should('be.focused').tab({ shift: true }) cy.get('@regexp').should('be.focused').tab({ shift: true })