diff --git a/frontend/src/lib-components/molecules/date-picker/DatePicker.spec.tsx b/frontend/src/lib-components/molecules/date-picker/DatePicker.spec.tsx index 540b3b96968..59b2332c430 100644 --- a/frontend/src/lib-components/molecules/date-picker/DatePicker.spec.tsx +++ b/frontend/src/lib-components/molecules/date-picker/DatePicker.spec.tsx @@ -26,7 +26,9 @@ const translations: Translations = { validDate: 'Invalid date', dateTooEarly: 'Date too early', dateTooLate: 'Date too late' - } + }, + open: 'Open date picker', + close: 'Close date picker' } } @@ -38,7 +40,7 @@ describe('DatePicker', () => { ) const get = () => - screen.getByRole('textbox', { description: 'Date picker description' }) + screen.getByRole('textbox', { name: 'Date picker description' }) it('attributes', () => { render( diff --git a/frontend/src/lib-components/molecules/date-picker/DateRangePicker.spec.tsx b/frontend/src/lib-components/molecules/date-picker/DateRangePicker.spec.tsx index 3947712fb73..8140dc4a8ba 100644 --- a/frontend/src/lib-components/molecules/date-picker/DateRangePicker.spec.tsx +++ b/frontend/src/lib-components/molecules/date-picker/DateRangePicker.spec.tsx @@ -26,7 +26,9 @@ const translations: Translations = { validDate: 'Invalid date', dateTooEarly: 'Date too early', dateTooLate: 'Date too late' - } + }, + open: 'Open date picker', + close: 'Close date picker' } } @@ -44,7 +46,7 @@ describe('DateRangePicker', () => { ) const [start, end] = screen.getAllByRole('textbox', { - description: 'Date picker description' + name: 'Date picker description' }) expect(start).toHaveAttribute('placeholder', 'Placeholder') expect(end).toHaveAttribute('placeholder', 'Placeholder') diff --git a/frontend/src/lib-components/utils/TestContextProvider.tsx b/frontend/src/lib-components/utils/TestContextProvider.tsx index 898e76899d7..36cfdae7e62 100644 --- a/frontend/src/lib-components/utils/TestContextProvider.tsx +++ b/frontend/src/lib-components/utils/TestContextProvider.tsx @@ -43,7 +43,9 @@ export const testTranslations: Translations = { validDate: '', dateTooEarly: '', dateTooLate: '' - } + }, + open: '', + close: '' }, documentTemplates: { templateQuestions: {