[No QA] Follow-up: add unit tests for broken feed connection utility functions#55866
Conversation
…tils file; add unit tests
| /* eslint-disable @typescript-eslint/naming-convention */ | ||
| const allCardsList = { | ||
| 'cards_11111111_oauth.capitalone.com': directFeedCardsMultipleList, | ||
| cards_11111111_vcf: customFeedCardsList, |
There was a problem hiding this comment.
Is this on purpose not a string?
Also lets test vcf1 since that is what we use now
| cards_11111111_vcf: customFeedCardsList, | |
| 'cards_11111111_vcf1': customFeedCardsList, |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.92-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.92-6 🚀
|
| return false; | ||
| } | ||
|
|
||
| return Object.values(feedCards).some((card) => card.bank !== feedToExclude && card.lastScrapeResult !== 200); |
There was a problem hiding this comment.
come from #57600, we need to check if card is empty object
There was a problem hiding this comment.
@DylanDylann In which case the card can be empty?
There was a problem hiding this comment.
I detailed it in this comment: #57600 (comment)
There was a problem hiding this comment.
@DylanDylann I feel like we needed to make sure that a card is never set as an empty object instead. 🤔
Otherwise, the Card type should be updated to indicate that it can be an empty object.
There was a problem hiding this comment.
yeah, it is a good point

Explanation of Change
flatAllCardsListandcheckIfFeedConnectionIsBrokenfunctions to theCardUtilsfileFollow up for #55286
Fixed Issues
$ #55103
PROPOSAL: N/A
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 stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.