From 4de28d32b419fe4175aabec73101c1bde7f87cbc Mon Sep 17 00:00:00 2001 From: yyh Date: Sun, 9 Aug 2026 14:35:53 +0800 Subject: [PATCH] fix(web): name annotation configuration action --- .../app/annotation/__tests__/index.spec.tsx | 4 +++- web/app/components/app/annotation/index.tsx | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/web/app/components/app/annotation/__tests__/index.spec.tsx b/web/app/components/app/annotation/__tests__/index.spec.tsx index 0c634092ebc516..951a76431ac627 100644 --- a/web/app/components/app/annotation/__tests__/index.spec.tsx +++ b/web/app/components/app/annotation/__tests__/index.spec.tsx @@ -501,7 +501,9 @@ describe('Annotation', () => { expect(latestListProps.selectedIds).toEqual([]) - const configButton = document.querySelector('.action-btn') as HTMLButtonElement + const configButton = screen.getByRole('button', { + name: 'appAnnotation.initSetup.configTitle', + }) fireEvent.click(configButton) expect(await screen.findByTestId('config-modal')).toBeInTheDocument() diff --git a/web/app/components/app/annotation/index.tsx b/web/app/components/app/annotation/index.tsx index afb27cdc5350d9..b20d4d92ccf768 100644 --- a/web/app/components/app/annotation/index.tsx +++ b/web/app/components/app/annotation/index.tsx @@ -202,8 +202,16 @@ const Annotation: FC = (props) => { {annotationConfig?.enabled && (
- setIsShowEdit(true)}> - + $['initSetup.configTitle'], { + ns: 'appAnnotation', + })} + onClick={() => setIsShowEdit(true)} + > +
)}