diff --git a/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx b/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx index b426e47227f662..f4eb453b273d47 100644 --- a/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx +++ b/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx @@ -83,7 +83,7 @@ describe('Result', () => { expect(screen.getByTestId('prompt-res'))!.toHaveTextContent('generated output') fireEvent.click(screen.getByTestId('version-selector')) - fireEvent.click(screen.getAllByRole('button')[1]!) + fireEvent.click(screen.getByRole('button', { name: 'common.operation.copy' })) fireEvent.click(screen.getByText(/(?:^|\.)generate\.apply(?=$|:)/)) expect(mockSetCurrentVersionIndex).toHaveBeenCalledWith(1) diff --git a/web/app/components/app/configuration/config/automatic/result.tsx b/web/app/components/app/configuration/config/automatic/result.tsx index 334d7927056a52..eea5ee9c717678 100644 --- a/web/app/components/app/configuration/config/automatic/result.tsx +++ b/web/app/components/app/configuration/config/automatic/result.tsx @@ -53,13 +53,14 @@ const Result: FC = ({