-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: add support for transitionEnd event in unit tests #33285
test: add support for transitionEnd event in unit tests #33285
Conversation
@thienlnam Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@allroundexperts Since you reviewed the linked PR, would you like to be the C+ on this as well? |
Sure thing! |
Reviewer Checklist
Screenshots/Videos |
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.
Tests well!
🎯 @allroundexperts, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #33430. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.16-5 🚀
|
Details
This fixes the failing unit test on PR: #32336
The reasoning is that since in the attached PR test is failing due to the fact that we have now updated the condition to show
ReportActionsSkeletonView
andReportActionsView
based ondidScreenTransitionEnd
which is a state value and it's toggled in thetransitionEnd
event listener of navigation.Now, in Unit testing we do have actual navigation going on by using the
fireEvent
onLHNOptionList
item. However, thetransitionEnd
isn't fired neither 'focus' event. I also tried withjest.runAllTimers
since we havefakeTimers
enabled globally injest.config
but that also doesn' help.So I have mocked the navigation and passed in the custom callback to trigger the
addListener
manually.Previously, this wasn't causing any failures due to the fact that we were not leveraging
didScreenTransitionEnd
inReportScreen
. This is however used inSearchPage
and as far as I know we don't have tests for that, yet.Fixed Issues
$ #32336
PROPOSAL: #32336
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
N/A
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A