[NoQA] Optimise PaginationTest#74234
Conversation
|
@abzokhattab 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] |
|
reviewing ... |
| // We now have 18 messages. 15 (MIN_INITIAL_REPORT_ACTION_COUNT) from the initial OpenReport and 3 from GetOlderActions. | ||
| // GetOlderActions only returns 3 actions since it reaches id '1', which is the created action. | ||
| expect(getReportActions()).toHaveLength(18); | ||
| await waitFor(() => { |
There was a problem hiding this comment.
@ShridharGoel Should we add the await waitFor for all other assertions to make it consistent? not so sure. what do you think?
There was a problem hiding this comment.
We needed it because GetOlderActions resolves after a network mock and the merges finish slightly later, so the length can still be lesser when the assertion first runs.
If we use it for other assertions also, it would add unnecessary polling since those actions don't involve waitForNetworkPromises. What do you think?
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
LGTM 🚀 All yours @roryabraham |
| } | ||
|
|
||
| async function fastSignInWithTestUser() { | ||
| await Onyx.multiSet({ |
There was a problem hiding this comment.
Should this be wrapped with act?
There was a problem hiding this comment.
In this we’re just preloading Onyx data before <App /> renders, so there’s no mounted UI to update yet. So act shouldn't be needed.
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.2.47-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.2.47-1 🚀
|
Explanation of Change
fastSignInWithTestUser()instead of driving the whole login form.Promise.all, cutting several sequentialOnyx.mergecalls.Fixed Issues
$ #74232
PROPOSAL: #74232 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop