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

[EuiSuperDatePicker] Fix locale date string test #8258

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Jan 6, 2025

Summary

This PR updates the EuiSuperdatePicker absolute_tab.test.tsx test by adding a year to the passed date string to prevent tests breaking on yearly changing week days.

Example failing test:

EuiAbsoluteTab › date parsing › parses date string in locale › {"dateString": "lun. janv. 1er", "locale": "fr-FR"}

The issue was that January 1st was a Monday in 2024, but is not a Monday in 2025.
We should fix the date to the year to ensure the test works generally.

QA

  • CI passes
  • verify tests pass
    • checkout this PR
    • move to packages/eui and run yarn test-unit src/components/date_picker/super_date_picker/date_popover/absolute_tab.test.tsx

@mgadewoll mgadewoll marked this pull request as ready for review January 6, 2025 16:09
@mgadewoll mgadewoll requested a review from a team as a code owner January 6, 2025 16:09
@mgadewoll mgadewoll force-pushed the superdatepicker/fix-date-string-locale-test branch from 3fb401d to 96eeec5 Compare January 6, 2025 23:49
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Contributor

@acstll acstll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes locally for me. LGTM 👌

@mgadewoll mgadewoll merged commit c8522d9 into elastic:main Jan 7, 2025
7 of 9 checks passed
@mgadewoll mgadewoll deleted the superdatepicker/fix-date-string-locale-test branch January 7, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants