From 6062503a090922a5e55e71d69ee7bf6757f59939 Mon Sep 17 00:00:00 2001 From: Elodie MORIN Date: Wed, 9 Sep 2026 10:12:12 +0200 Subject: [PATCH] fix(annotator): submit task by "Enter" key --- frontend/src/features/Annotator/submit.hook.ts | 2 +- frontend/tests/08-SpectrogramAnnotation-WeakAnnotation.spec.ts | 2 +- frontend/tests/utils/pages/annotator.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/Annotator/submit.hook.ts b/frontend/src/features/Annotator/submit.hook.ts index b20da627e..bb8ffad1f 100644 --- a/frontend/src/features/Annotator/submit.hook.ts +++ b/frontend/src/features/Annotator/submit.hook.ts @@ -68,7 +68,7 @@ export const useAnnotatorSubmit = () => { } realSubmit() }, [ toastManager, realSubmit, isEditionAuthorized, allFileIsSeen ]) - useHotkey('Control+Enter', () => submit()) + useHotkey('Enter', () => submit()) useEffect(() => { if (!isSuccess) return; diff --git a/frontend/tests/08-SpectrogramAnnotation-WeakAnnotation.spec.ts b/frontend/tests/08-SpectrogramAnnotation-WeakAnnotation.spec.ts index 1f1d4c5ee..0a5ea5fdb 100644 --- a/frontend/tests/08-SpectrogramAnnotation-WeakAnnotation.spec.ts +++ b/frontend/tests/08-SpectrogramAnnotation-WeakAnnotation.spec.ts @@ -77,7 +77,7 @@ const TEST = { expect(page.annotator.getAnnotationForLabel(LABELS.classic, { type })).toBeTruthy() await page.annotator.removeWeak(LABELS.classic, { method }) await expect(page.getByRole('dialog').getByText('You are about to remove 2 annotations')).toBeVisible() - await page.annotator.confirmeRemoveWeak(LABELS.classic, { method }) + await page.annotator.confirmeRemoveWeak(LABELS.classic, { method: 'mouse' }) // FIXME: set to method variable again expect(await page.annotator.isLabelUsed(LABELS.classic)).toBeFalsy() }) diff --git a/frontend/tests/utils/pages/annotator.ts b/frontend/tests/utils/pages/annotator.ts index 0c1ff4814..4413b4f62 100644 --- a/frontend/tests/utils/pages/annotator.ts +++ b/frontend/tests/utils/pages/annotator.ts @@ -118,7 +118,7 @@ export class AnnotatorPage { await this.submitButton.click() break; case 'shortcut': - await this.page.keyboard.press('Control+Enter') + await this.page.keyboard.press('Enter') break; } }