Skip to content
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

Add ability to bulk select cards from the same bank in the Card filter #53389

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

SzymczakJ
Copy link
Contributor

@SzymczakJ SzymczakJ commented Dec 2, 2024

Explanation of Change

This PR adds Card feeds secion to Card filter on Search page, which is only visible to workspace admin. With this PR admin will be able to bulk select cards from the same feed.
PR also makes workspace admins see all the cards linked to workspace(taken from cards_ Onyx key).
Card feeds secion is built from workspace feeds(cards_ Onyx key) and domain feeds which are separeted from cardList object(cardList Onyx key), because right now New Dot doesn't fully support domain cards and it's the only Onyx object that contains it. Admin cannot see all domain cards yet.

Fixed Issues

$ #53231
PROPOSAL: N/A

Tests

  1. Test on account that has at least three workspaces with linked expensify cards and three workspaces with linked company cards(both of them with admin permissions) and a few domain cards linked(*I think we can only assign domain cards on staging by adhoc builds so this part only applies to staging testing).
  2. Enter advanced filters on search page and go to card filter.
  3. Try scrolling card filter page, selecting and deselecting individual cards.
  4. Try selecting card feeds and make sure connected cards also get selected.
  5. Try unselecting one of the card feed's individual cards and make sure card feed is also unselected.
  6. Try using input to filter cards.
  7. Make sure that after saving cards are visible on advanced filters page and after showing results also in the search page input.

Offline tests

QA Steps

Same as tests. Please make sure domain feeds are tested well as I didn't have access to any domain feed.

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
android.mov
Android: mWeb Chrome
androidweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ioweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov

@luacmartins luacmartins self-requested a review December 2, 2024 17:46
@SzymczakJ SzymczakJ changed the title WIP Add ability to bulk select cards from the same bank in the Card filter Add ability to bulk select cards from the same bank in the Card filter Dec 6, 2024
Copy link
Contributor

@Kicu Kicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these stuff looks ok, although logic is pretty complex 😅
Left some small comments

Copy link
Contributor

@Kicu Kicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped small comments

tests/unit/Search/buildSubstitutionsMapTest.ts Outdated Show resolved Hide resolved
tests/unit/Search/buildCardFilterDataTest.ts Show resolved Hide resolved
tests/unit/Search/buildCardFilterDataTest.ts Outdated Show resolved Hide resolved
@SzymczakJ
Copy link
Contributor Author

At the moment the API command that downloads card data is working only on staging so make sure you have it turned on.

@luacmartins
Copy link
Contributor

Yea, let's get @rayane-djouah to review this since they have context

@luacmartins luacmartins requested review from rayane-djouah and removed request for jayeshmangwani December 18, 2024 15:01
@luacmartins
Copy link
Contributor

@rayane-djouah let's prioritize reviewing this one once you're online!

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Dec 18, 2024

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

@SzymczakJ
Copy link
Contributor Author

Fixed your comments @rayane-djouah

bank,
correspondingCardIDs,
iconStyles,
cardFeedLabel: isBankRepeating ? domainName : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause the card feed label to be displayed in expensify-policy${policyID}.exfy default format for workspaces without a custom domain.

Screenshot 2024-12-19 at 4 22 23 PM

We need to display a human-readable name for Expensify policy domain names similar to what we already do here:

const getDescriptionForPolicyDomainCard = (domainName: string): string => {
// A domain name containing a policyID indicates that this is a workspace feed
const policyID = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME)?.[1];
if (policyID) {
const policy = PolicyUtils.getPolicy(policyID.toUpperCase());
return policy?.name ?? domainName;
}
return domainName;
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've applied your suggestion but have no domain cards to test it. When you test this Pr again please look at this part.

const text = card.bank === CONST.EXPENSIFY_CARD.BANK ? card.bank : cardName;

return {
lastFourPAN: card.lastFourPAN,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Physical cards that have not yet been issued lack a lastFourPAN and are uniformly labeled as Expensify Card:

Screenshot 2024-12-19 at 8 25 19 PM Screenshot 2024-12-19 at 8 25 41 PM

I think we should consider either modifying how these cards are displayed or not showing the unissued cards (that do not have a lastFourPAN) at all.

const cardToBeIssued = domainCards.find((card) => !card?.nameValuePairs?.isVirtual && card?.state === CONST.EXPENSIFY_CARD.STATE.STATE_NOT_ISSUED);

@luacmartins, what are your thoughts on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you cannot pay with a unissued card, so there's no point in searching report with them. We could just filter them out. WDYT @luacmartins

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Let's filter out unissued cards. Nice catch!

Comment on lines 76 to 83
// When user is admin of a workspace he sees all the cards of workspace under cards_ Onyx key
const allWorkspaceCards: CardFilterItem[] = Object.values(workspaceCardFeeds)
.filter((cardFeed) => !isEmptyObject(cardFeed))
.flatMap((cardFeed) => {
return Object.values(cardFeed as Record<string, Card>)
.filter((card) => card && CardUtils.isCard(card) && !userCardList?.[card.cardID])
.map((card) => createIndividualCardFilterItem(card, selectedCards, iconStyles));
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The admin of a workspace currently cannot differentiate between cards assigned to them and those assigned to other members:

Before After
Screenshot 2024-12-19 at 8 42 34 PM Screenshot 2024-12-19 at 8 40 11 PM

@Expensify/design, @luacmartins, should we consider modifying the card list item to address this issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, this makes me wonder if we should reconsider the avatars we use for cards... should we consider something more like this?
CleanShot 2024-12-19 at 15 10 26@2x

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo I could definitely be into something like that.

Copy link
Contributor Author

@SzymczakJ SzymczakJ Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link the whole figma for that design? Also does that mean that we should grup cards in Card Filter by user? @shawnborton

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that this would work much like Workspace avatars do...

The workspace itself just uses a single avatar. In this case, the feed itself uses a single avatar and that's the big card logo.

But then individual users/cards within the feed get the stacked avatar + card treatment like I'm showing above.

Before we commit to that, let's see what @JmillsExpensify @trjExpensify @Expensify/design @joekaufmanexpensify thinks though. I think it could help solve this issue though.

Copy link
Contributor Author

@SzymczakJ SzymczakJ Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure how the whole card filter should look like though. Would you give me the link to this Figma? Previously the desing didn't contain any groupings like your screenshot does. Or maybe this screenshot comes from another desing and I should only add these avatars to card filter? @shawnborton

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it would look something like this:
CleanShot 2025-01-07 at 18 11 03@2x

So the main card feed is an option at the very top. Then below we have individual cards. That's just like you are doing above. But the only difference is how we display the avatar and card name. Thoughts? cc @JmillsExpensify @joekaufmanexpensify @Expensify/design

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'm super into that. We get ALL the info in there and it looks really nice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! This change would apply to third party cards too, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me as well! Thanks for clarification

data: cards,
shouldShow: cards.length > 0,
title: translate('search.filters.card.individualCards'),
data: individualCardsSectionData.filter((item) => item.text?.toLocaleLowerCase().includes(debouncedSearchTerm.toLocaleLowerCase())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to include fields other than item.text in the search, such as item.lastFourPAN?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to allow for lastFourPAN search too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console error:

Screenshot 2024-12-19 at 9 22 14 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see such error, also everything that could cause "update max depth exceeded" seems wrapped in useMemo, so I don't see a case when this error pops up. Do you have some specific steps of reproduction for this error?
Screenshot 2024-12-20 at 11 52 47

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUG: When a feed list item is selected, the list automatically scrolls down to the individual cards. Conversely, selecting an individual card causes the list to automatically scroll up to the corresponding feed list item:

Screen.Recording.2024-12-19.at.9.28.06.PM.mov

},
};
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SzymczakJ I'm testing with the mock data below. Is the data correct, or am I missing something?

Code
Onyx.merge('cardList', {
    '21588678': {
        accountID: 1,
        bank: 'Expensify Card',
        cardID: 21588678,
        cardName: '455594XXXXXX1138',
        domainName: 'expensify-005AA2EAC6D4E280.exfy',
        lastFourPAN: '1138',
    },
    '21588684': {
        accountID: 1,
        bank: 'Expensify Card',
        cardID: 21588684,
        cardName: '',
        domainName: 'expensify-FD17559D0E7ED371.exfy',
        lastFourPAN: '',
    },
    '21589202': {
        accountID: 1,
        bank: 'Expensify Card',
        cardID: 21589202,
        cardName: '455594XXXXXX6232',
        domainName: 'expensify-FD17559D0E7ED371.exfy',
        lastFourPAN: '6232',
    },
    '21604933': {
        accountID: 1,
        bank: 'vcf',
        cardID: 21604933,
        cardName: '480801XXXXXX1601',
        domainName: 'expensify-005AA2EAC6D4E280.exfy',
        lastFourPAN: '1601',
    },
    '11111111': {
        accountID: 1,
        bank: 'Expensify Card',
        cardID: 11111111,
        cardName: '455594XXXXXX1139',
        domainName: 'testDomain.com',
        lastFourPAN: '1139',
    },
    '234523452345': {
        cardID: 234523452345,
        state: 3,
        bank: 'Expensify Card',
        availableSpend: 10000,
        domainName: 'expensify.com',
        lastFourPAN: '2345',
        isVirtual: true,
        cardholderFirstName: 'Test',
        cardholderLastName: 'Test',
    },
    '234523452346': {
        cardID: 234523452346,
        state: 4,
        bank: '1000',
        availableSpend: 10000,
        domainName: 'expensify.com',
        lastFourPAN: '2346',
        isVirtual: false,
    },
});



Onyx.merge(`cards_18680694_vcf`, {
    '21593492': {
        accountID: 17822766,
        bank: 'vcf',
        cardID: 21593492,
        cardName: '480801XXXXXX9411',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '9411',
    },
    '21604933': {
        accountID: 17822766,
        bank: 'vcf',
        cardID: 21604933,
        cardName: '480801XXXXXX1601',
        domainName: 'expensify-FD17559D0E7ED371.exfy',
        lastFourPAN: '1601',
    },
    '21638320': {
        accountID: 17822777,
        bank: 'vcf',
        cardID: 21638320,
        cardName: '480801XXXXXX2617',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '2617',
    },
    '21638598': {
        accountID: 14826403,
        bank: 'vcf',
        cardID: 21638598,
        cardName: '480801XXXXXX2111',
        domainName: 'expensify-FD17559D0E7ED371.exfy',
        lastFourPAN: '2111',
    },
    cardList: {
        test: '231:1111111',
    },
});


Onyx.merge('cards_18465979_Expensify Card', {
    '21588678': {
        accountID: 17861101,
        bank: 'Expensify Card',
        cardID: 21588678,
        cardName: '455594XXXXXX1134',
        domainName: 'expensify-005AA2EAC6D4E280.exfy',
        lastFourPAN: '1134',
    },
    '21588684': {
        accountID: 18118340,
        bank: 'Expensify Card',
        cardID: 21588684,
        cardName: '',
        domainName: 'expensify-005AA2EAC6D4E280.exfy',
        lastFourPAN: '',
    },
});

Onyx.merge('cards_18643109_Expensify Card', {
    '21589168': {
        accountID: 17822777,
        bank: 'Expensify Card',
        cardID: 21589168,
        cardName: '455594XXXXXX4163',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '4163',
    },
    '21589182': {
        accountID: 17822780,
        bank: 'Expensify Card',
        cardID: 21589182,
        cardName: '',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '',
    },
    '21589202': {
        accountID: 17822780,
        bank: 'Expensify Card',
        cardID: 21589202,
        cardName: '455594XXXXXX6232',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '6232',
    },
    '21638322': {
        accountID: 14826403,
        bank: 'Expensify Card',
        cardID: 21638322,
        cardName: '',
        domainName: 'expensify-7BFA00039DEB0D94.exfy',
        lastFourPAN: '',
    },
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I limited the mocks to have only what we need, Card objects are enormous and if I wanted to include all the data, that BE gives us, then These mocks would take 2.5x more code lines.

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work so far! We have a few pending items to address from the last review but looking good otherwise

@rayane-djouah
Copy link
Contributor

There are merge conflicts that need to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants