Skip to content

Commit e3d925b

Browse files
authored
Merge pull request Expensify#73435 from Expensify/valforte/testGBRawaitingUserSubmission
[No QA] Add test for awaiting user submission with manual submit
2 parents 32fae9a + d23e668 commit e3d925b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

tests/unit/ReportUtilsTest.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,30 @@ describe('ReportUtils', () => {
22342234

22352235
expect(requiresAttentionFromCurrentUser(report)).toBe(true);
22362236
});
2237+
2238+
it('returns true for expense report awaiting submission with manual submit', async () => {
2239+
const report = {
2240+
...LHNTestUtils.getFakeReport(),
2241+
policyID: '1',
2242+
managerID: currentUserAccountID,
2243+
type: CONST.REPORT.TYPE.EXPENSE,
2244+
stateNum: CONST.REPORT.STATE_NUM.OPEN,
2245+
statusNum: CONST.REPORT.STATUS_NUM.OPEN,
2246+
};
2247+
2248+
const policyExpenseChat = {
2249+
...createPolicyExpenseChat(100, true),
2250+
policyID: '1',
2251+
ownerAccountID: currentUserAccountID,
2252+
hasOutstandingChildRequest: true,
2253+
};
2254+
2255+
await Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}1`, {reimbursementChoice: CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL});
2256+
2257+
// The GBR should appear on the policy expense chat but not on the report itself
2258+
expect(requiresAttentionFromCurrentUser(report)).toBe(false);
2259+
expect(requiresAttentionFromCurrentUser(policyExpenseChat)).toBe(true);
2260+
});
22372261
});
22382262

22392263
describe('getChatRoomSubtitle', () => {

0 commit comments

Comments
 (0)