diff --git a/kafka-ui-react-app/src/components/Topics/New/__test__/New.spec.tsx b/kafka-ui-react-app/src/components/Topics/New/__test__/New.spec.tsx index f1a6aab9dc..d980b33d38 100644 --- a/kafka-ui-react-app/src/components/Topics/New/__test__/New.spec.tsx +++ b/kafka-ui-react-app/src/components/Topics/New/__test__/New.spec.tsx @@ -50,7 +50,7 @@ describe('New', () => { renderComponent(mockedHistory); await waitFor(() => { - userEvent.click(screen.getByText('Send')); + userEvent.click(screen.getByText(/submit/i)); }); await waitFor(() => { expect(screen.getByText('name is a required field')).toBeInTheDocument(); @@ -76,7 +76,7 @@ describe('New', () => { await waitFor(() => { userEvent.type(screen.getByPlaceholderText('Topic Name'), topicName); - userEvent.click(screen.getByText('Send')); + userEvent.click(screen.getByText(/submit/i)); }); await waitFor(() => diff --git a/kafka-ui-react-app/src/components/Topics/shared/Form/TopicForm.tsx b/kafka-ui-react-app/src/components/Topics/shared/Form/TopicForm.tsx index 875c22c29c..d5cc7ea08e 100644 --- a/kafka-ui-react-app/src/components/Topics/shared/Form/TopicForm.tsx +++ b/kafka-ui-react-app/src/components/Topics/shared/Form/TopicForm.tsx @@ -198,7 +198,7 @@ const TopicForm: React.FC = ({ diff --git a/kafka-ui-react-app/src/components/Topics/shared/Form/__tests__/TopicForm.spec.tsx b/kafka-ui-react-app/src/components/Topics/shared/Form/__tests__/TopicForm.spec.tsx index d98ee0706c..1f9ca4e523 100644 --- a/kafka-ui-react-app/src/components/Topics/shared/Form/__tests__/TopicForm.spec.tsx +++ b/kafka-ui-react-app/src/components/Topics/shared/Form/__tests__/TopicForm.spec.tsx @@ -57,7 +57,7 @@ describe('TopicForm', () => { expectByRoleAndNameToBeInDocument('heading', 'Custom parameters'); - expectByRoleAndNameToBeInDocument('button', 'Send'); + expectByRoleAndNameToBeInDocument('button', 'Submit'); }); it('submits', () => { @@ -66,7 +66,7 @@ describe('TopicForm', () => { onSubmit: onSubmit.mockImplementation((e) => e.preventDefault()), }); - userEvent.click(screen.getByRole('button', { name: 'Send' })); + userEvent.click(screen.getByRole('button', { name: 'Submit' })); expect(onSubmit).toBeCalledTimes(1); }); });