Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Päivämääräkentän saavutettavuus #6117

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update date picker tests
  • Loading branch information
tomuli committed Dec 12, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit f711ba824f404195445151b34e68639d46fa80ab
Original file line number Diff line number Diff line change
@@ -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', () => {
</TestContextProvider>
)
const get = () =>
screen.getByRole('textbox', { description: 'Date picker description' })
screen.getByRole('textbox', { name: 'Date picker description' })

it('attributes', () => {
render(
Original file line number Diff line number Diff line change
@@ -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')
4 changes: 3 additions & 1 deletion frontend/src/lib-components/utils/TestContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -43,7 +43,9 @@ export const testTranslations: Translations = {
validDate: '',
dateTooEarly: '',
dateTooLate: ''
}
},
open: '',
close: ''
},
documentTemplates: {
templateQuestions: {
Loading