-
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
[NoQA] [Reassure] SearchPage perf tests #33872
[NoQA] [Reassure] SearchPage perf tests #33872
Conversation
|
||
const mockedReports = getMockedReportsMap(600); | ||
const mockedBetas = _.values(CONST.BETAS); | ||
const mockedPersonalDetails = LHNTestUtils.fakePersonalDetails; |
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.
How about using createPersonalDetails
from utils/collections
here?
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.
sure, I will refactor it
return _.assign({}, ...mockReports); | ||
}; | ||
|
||
const getMockedPersonalDetailsMap = (length) => { |
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.
Instead of creating getMockedPersonalDetailsMap
we can use createCollection
. Take a look at docs . Same with getMockedReportsMap
@ 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] |
Yeah I can review For future, the issues need to be linked exactly like this: you were missing a space so thats why I was not assigned |
Reviewer Checklist
Screenshots/VideosN/A automated tests Android: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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.
@rinej small comments!
@@ -33,16 +33,19 @@ const propTypes = { | |||
|
|||
/** Whether we are searching for reports in the server */ | |||
isSearchingForReports: PropTypes.bool, | |||
|
|||
navigation: PropTypes.shape({}), |
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.
Can you please add a comment here to adhere with the style rules. Thanks!
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.
ideally noting this is for automated tests
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.
sure, will do
* This is a helper function to create a mock for the addListener function of the react-navigation library. | ||
* Same approach as in ReportScreen.perf-test.js | ||
* | ||
* P.S: This can't be moved to a utils file because Jest wants any external function to stay in the scope. |
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.
Is there really no way to share such methods across Jest tests?
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.
I moved it to TestHelper
file and tests worked properly :)
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.
Thank you @rinej
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.29-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.29-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.29-1 🚀
|
Details
Fixed Issues
$ #33229
PROPOSAL:
Added reassure perf tests to the SearchPage component
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)Design
label so the design team can review the changes.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop