-
Notifications
You must be signed in to change notification settings - Fork 14k
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
test: fix TimezoneSelector tests on daylight saving time #19156
Conversation
Managed to fix the tests with cc @suddjian |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, learned a new jest thing 🎉
Codecov Report
@@ Coverage Diff @@
## master #19156 +/- ##
==========================================
- Coverage 66.55% 66.37% -0.19%
==========================================
Files 1646 1646
Lines 63632 63631 -1
Branches 6476 6476
==========================================
- Hits 42353 42232 -121
- Misses 19597 19717 +120
Partials 1682 1682
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
A Cypress test is consistently failing. I don't think it is related to my changes because this PR only changes a unit test file. Will investigate nonetheless |
55e0ecd
to
632c5be
Compare
If that failing test is unrelated, should we just skip it for now, and unblock the PR logjam? |
@rusackas Let's see if the new commit mitigate it. If not, I'll just skip it. |
96f3370
to
317b435
Compare
317b435
to
7d9647e
Compare
@@ -55,49 +77,65 @@ it('use the default timezone when an invalid timezone is provided', async () => | |||
expect(onTimezoneChange).toHaveBeenLastCalledWith('Africa/Abidjan'); | |||
}); | |||
|
|||
it.skip('can select a timezone values and returns canonical value', async () => { | |||
test('render timezones in correct oder for standard time', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (if you happen to need to push more changes):
test('render timezones in correct oder for standard time', async () => { | |
test('render timezones in correct order for standard time', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I don't... Will fix it in some other PR.
(cherry picked from commit 8d53db1)
SUMMARY
Another take on #19148, fixing the tests with
jest.isolateModules
instead of making the component to get current time every time it is mounted.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
CI
ADDITIONAL INFORMATION