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)} + > +
)}