Skip to content

[Due for payment 2025-11-20] [$125] [Create Automated Test] Inbox - GBR: workspace chat physical expensify card has issued awaiting user address #69896

Closed

Description

@clarajones-expensify

This issue is to track the creation of automated tests to ensure that all Red Brick Road and Green Brick Road flows are working as expected. This issue covers one specific instance of where the Brick Road shows up and the criteria for it doing so.

Context

This is one issue of a larger project to create GBR tests. We'll create a FE and a BE test for each issue, and I'll be handling the BE test for most of the issues. Please feel free to ask any clarifying questions as to the behavior that should be asserted

Test case

Section: Inbox
Type: GBR
Criteria for showing the brick road: In workspace chat, physical Expensify Card has been issued, and awaiting user to add private personal shipping details for the physical card in order to be actually shipped
Intentional?: Yes
What the green/red dot links to: NA

Project Tracker: #66716

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021986054809464788020
  • Upwork Job ID: 1986054809464788020
  • Last Price Increase: 2025-11-05
Issue OwnerCurrent Issue Owner: @

Activity

  1. melvin-bot commented on Sep 4, 2025

    @melvin-bot

    Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

  2. changed the title [-][Create Automated Test] Inbox - GBR: workspace chat physical expensify card has issued awaiting user add[/-] [+][Create Automated Test] Inbox - GBR: workspace chat physical expensify card has issued awaiting user address[/+] on Sep 8, 2025
  3. added
    Internal
    Hot Pick
    on Sep 8, 2025
  4. melvin-bot commented on Sep 29, 2025

    @melvin-bot

    This issue has not been updated in over 15 days. eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  5. Valforte commented on Oct 31, 2025

    @Valforte
    Contributor

    I don't see a way to test for this GBR on the backend. Will ask for help

  6. ShridharGoel commented on Oct 31, 2025

    @ShridharGoel
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The Inbox should surface a green brick road when a workspace chat is waiting on someone to add Expensify Card shipping details. We need to have an automated test that confirms this behaviour.

    What is the root cause of that problem?

    Our ReportUtils tests stop after verifying generic reasons and card fraud alerts, but never cover the card-missing-address path for workspace chats.

    const report = createAdminRoom(1);
    expect(shouldReportShowSubscript(report)).toBe(false);
    });
    it('should return false for announce room', () => {
    const report = createAnnounceRoom(1);
    expect(shouldReportShowSubscript(report)).toBe(false);
    });
    it('should return false for domain room', () => {
    const report = createDomainRoom(1);
    expect(shouldReportShowSubscript(report)).toBe(false);
    });
    it('should return false for regular task report (non-workspace)', () => {
    const report = {...createRegularTaskReport(1, currentUserAccountID), chatType: CONST.REPORT.CHAT_TYPE.TRIP_ROOM};
    expect(shouldReportShowSubscript(report)).toBe(false);
    });
    });
    describe('isArchivedNonExpenseReport', () => {
    // Given an expense report, a chat report, and an archived chat report
    const expenseReport: Report = {
    ...createRandomReport(1000, undefined),

    What changes do you think we should make in order to solve the problem?

    Add a unit test that seeds a policy chat with a CARD_MISSING_ADDRESS action and asserts that getReasonAndReportActionThatRequiresAttention returns the waiting-for-assignee reason.

            it('should require attention when a workspace chat awaits Expensify Card shipping details', async () => {
                const workspaceChat = {
                    ...createPolicyExpenseChat(41000),
                    hasOutstandingChildTask: true,
                };
                const cardMissingAddressAction: ReportAction = {
                    reportActionID: 'card-missing-address-action',
                    actionName: CONST.REPORT.ACTIONS.TYPE.CARD_MISSING_ADDRESS,
                    childType: CONST.REPORT.TYPE.TASK,
                    childReportID: 'task-41000',
                    created: DateUtils.getDBTime(),
                    originalMessage: {
                        assigneeAccountID: currentUserAccountID,
                        cardID: 41000,
                    },
                };
    
                await Onyx.set(`${ONYXKEYS.COLLECTION.REPORT}${workspaceChat.reportID}`, workspaceChat);
                await Onyx.set(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${workspaceChat.reportID}`, {
                    [cardMissingAddressAction.reportActionID]: cardMissingAddressAction,
                });
                await waitForBatchedUpdates();
    
                const {result: isReportArchived} = renderHook(() => useReportIsArchived(workspaceChat.reportID));
                const result = getReasonAndReportActionThatRequiresAttention(workspaceChat, undefined, isReportArchived.current);
    
                expect(result?.reason).toBe(CONST.REQUIRES_ATTENTION_REASONS.IS_WAITING_FOR_ASSIGNEE_TO_COMPLETE_ACTION);
                expect(result?.reportAction?.reportActionID).toBe(cardMissingAddressAction.reportActionID);
            });
  7. 25 remaining items

  8. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Nov 13, 2025
  9. changed the title [-][$125] [Create Automated Test] Inbox - GBR: workspace chat physical expensify card has issued awaiting user address[/-] [+][Due for payment 2025-11-20] [$125] [Create Automated Test] Inbox - GBR: workspace chat physical expensify card has issued awaiting user address[/+] on Nov 13, 2025
  10. removed
    Reviewing
    on Nov 13, 2025
  11. melvin-bot commented on Nov 13, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Nov 13, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.57-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-11-20. 🎊

    For reference, here are some details about the assignees on this issue:

  13. added
    Daily
    and removed
    Weekly
    on Nov 19, 2025
  14. ShridharGoel commented on Nov 20, 2025

    @ShridharGoel
    Contributor

    @clarajones-expensify Hi, this is due for payment.

  15. clarajones-expensify commented on Nov 20, 2025

    @clarajones-expensify
    ContributorAuthor

    Payment Summary

    Contributor: @ShridharGoel due $125 via NewDot
    Contributor+: @Krishna2323 due $125 via NewDot

  16. moved this from MEDIUM or LOW to Done in [#whatsnext] #migrateon Nov 20, 2025
  17. Krishna2323 commented on Dec 6, 2025

    @Krishna2323
    Contributor

    Requested in ND.

  18. quinthar commented on Dec 8, 2025

    @quinthar
    Contributor

    Approved $125 to @Krishna2323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentDailyEngineeringExternalHelp WantedTask

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions