From b6a98fe0cc5b7940f14de3fb165a46b7dadd8878 Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Wed, 18 Dec 2024 12:57:23 +0400 Subject: [PATCH] fix broken test --- .../modals/SendClaimsModal/SendClaimsModal.test.js | 8 ++++---- translations/stripes-acq-components/en.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/claiming/components/modals/SendClaimsModal/SendClaimsModal.test.js b/lib/claiming/components/modals/SendClaimsModal/SendClaimsModal.test.js index db75c474..ab712ff7 100644 --- a/lib/claiming/components/modals/SendClaimsModal/SendClaimsModal.test.js +++ b/lib/claiming/components/modals/SendClaimsModal/SendClaimsModal.test.js @@ -32,7 +32,7 @@ describe('SendClaimsModal', () => { it('should render send claim modal', () => { renderSendClaimsModal(); - expect(screen.getByText('ui-receiving.modal.sendClaim.heading')).toBeInTheDocument(); + expect(screen.getByText('stripes-acq-components.claiming.modal.sendClaim.heading')).toBeInTheDocument(); }); it('should validate "Claim expiry date" field', async () => { @@ -45,7 +45,7 @@ describe('SendClaimsModal', () => { await user.type(screen.getByPlaceholderText(FORMAT), today.format(FORMAT)); await user.click(saveBtn); - expect(screen.getByText('ui-receiving.validation.dateAfter')).toBeInTheDocument(); + expect(screen.getByText('stripes-acq-components.validation.dateAfter')).toBeInTheDocument(); }); it('should submit valid form', async () => { @@ -56,8 +56,8 @@ describe('SendClaimsModal', () => { const externalNote = 'External'; await user.type(screen.getByPlaceholderText(FORMAT), date.format(FORMAT)); - await user.type(screen.getByLabelText('ui-receiving.piece.internalNote'), internalNote); - await user.type(screen.getByLabelText('ui-receiving.piece.externalNote'), externalNote); + await user.type(screen.getByLabelText('stripes-acq-components.claiming.modal.sendClaim.field.internalNote'), internalNote); + await user.type(screen.getByLabelText('stripes-acq-components.claiming.modal.sendClaim.field.externalNote'), externalNote); await user.click(screen.getByRole('button', { name: 'stripes-acq-components.FormFooter.save' })); expect(defaultProps.onSubmit).toHaveBeenCalledWith( diff --git a/translations/stripes-acq-components/en.json b/translations/stripes-acq-components/en.json index 9255cab2..b069c9f8 100644 --- a/translations/stripes-acq-components/en.json +++ b/translations/stripes-acq-components/en.json @@ -212,6 +212,7 @@ "location.label": "Name (code)", "validation.cantContainSpaces": "Spaces aren't allowed", + "validation.dateAfter": "Selected date must be later than the current date", "validation.fundDistributionType": "All distributions should be the same type", "validation.fundDistribution.uniqueFunds": "You can not have multiple distributions for the same fund with the same expense class.", "validation.invalidURL": "URL is not valid, must include URL scheme. Eg. ftp://",