diff --git a/src/components/Dialog/FormDialog.tsx b/src/components/Dialog/FormDialog.tsx index fe224dda6..d9eacd9d3 100644 --- a/src/components/Dialog/FormDialog.tsx +++ b/src/components/Dialog/FormDialog.tsx @@ -143,7 +143,7 @@ export const FormDialog = < onClick={handleSubmit} type='submit' > - {title ?? t('Submit')} + {t('Send')} diff --git a/src/components/Poll/__tests__/AddCommentForm.test.js b/src/components/Poll/__tests__/AddCommentForm.test.js index 176b75d36..12580a5b0 100644 --- a/src/components/Poll/__tests__/AddCommentForm.test.js +++ b/src/components/Poll/__tests__/AddCommentForm.test.js @@ -6,9 +6,6 @@ import { AddCommentForm } from '../PollActions'; import { PollProvider, TranslationProvider } from '../../../context'; import { generatePoll } from '../../../mock-builders'; -const ADD_COMMENT_TEXT = 'Add a comment'; -const UPDATE_COMMENT_TEXT = 'Update your comment'; - const close = jest.fn(); const messageId = 'messageId'; const newlyTypedValue = 'XX'; @@ -35,7 +32,7 @@ describe('AddCommentForm', () => { expect(input).toHaveValue(poll.data.ownAnswer.text); const submitButton = container.querySelector('button[type="submit"]'); expect(submitButton).toBeDisabled(); - expect(submitButton).toHaveTextContent(UPDATE_COMMENT_TEXT); + expect(submitButton).toHaveTextContent('Send'); act(() => { fireEvent.change(input, { target: { value: newlyTypedValue } }); @@ -43,7 +40,7 @@ describe('AddCommentForm', () => { await waitFor(() => { expect(submitButton).toBeEnabled(); - expect(submitButton).toHaveTextContent(UPDATE_COMMENT_TEXT); + expect(submitButton).toHaveTextContent('Send'); }); act(() => { @@ -63,13 +60,13 @@ describe('AddCommentForm', () => { expect(input).toHaveValue(''); const submitButton = container.querySelector('button[type="submit"]'); expect(submitButton).toBeDisabled(); - expect(submitButton).toHaveTextContent(ADD_COMMENT_TEXT); + expect(submitButton).toHaveTextContent('Send'); act(() => { fireEvent.change(input, { target: { value: newlyTypedValue } }); }); await waitFor(() => { expect(submitButton).toBeEnabled(); - expect(submitButton).toHaveTextContent(ADD_COMMENT_TEXT); + expect(submitButton).toHaveTextContent('Send'); }); act(() => { fireEvent.click(submitButton); diff --git a/src/components/Poll/__tests__/SuggestPollOptionForm.test.js b/src/components/Poll/__tests__/SuggestPollOptionForm.test.js index 9825231a6..51af83fe3 100644 --- a/src/components/Poll/__tests__/SuggestPollOptionForm.test.js +++ b/src/components/Poll/__tests__/SuggestPollOptionForm.test.js @@ -6,7 +6,7 @@ import { SuggestPollOptionForm } from '../PollActions'; import { ChatProvider, PollProvider, TranslationProvider } from '../../../context'; import { generatePoll } from '../../../mock-builders'; -const SUBMIT_BUTTON_TEXT = 'Suggest an option'; +const SUBMIT_BUTTON_TEXT = 'Send'; const close = jest.fn(); const messageId = 'messageId';