[No QA] [CFI] [FAB Follow-up] Create unit tests for the new primary receipt scan option#73522
Conversation
|
@ZhenjaHorbach 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] |
|
|
||
| // useResponsiveLayout determines LHB visibility. Mock a wide layout to keep behaviour deterministic. | ||
| jest.mock('@hooks/useResponsiveLayout', () => (): {shouldUseNarrowLayout: boolean} => ({shouldUseNarrowLayout: false})); | ||
| // jest.mock('@hooks/useResponsiveLayout', () => (): {shouldUseNarrowLayout: boolean} => ({shouldUseNarrowLayout: false})); |
There was a problem hiding this comment.
Do we need this commented mock?
There was a problem hiding this comment.
We don't, good catch!
|
|
||
| it('changes background color on hover', () => { | ||
| renderFAB(); | ||
| const frb = screen.getByTestId('floating-receipt-button'); |
There was a problem hiding this comment.
Let's add an empty line after renderFAB()
|
@ZhenjaHorbach updated! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
LGTM! |
mountiny
left a comment
There was a problem hiding this comment.
LGTM, thanks! Would there be more things to test in here by any chance?
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.41-0 🚀
|
@mountiny I thought about this and also discussed it briefly with @ZhenjaHorbach. I came to conclusion that a big part of the related logic is handled by the platform files so it doesn't really make sense to test it. However, if there is anything else you think we should test, I will be happy to do so |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.2.41-6 🚀
|
Explanation of Change
Unit tests related to FloatingCameraButton will be implemented in #72786.
Fixed Issues
$ #72784
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
N/A
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