Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions tests/unit/ReportSecondaryActionUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ describe('getSecondaryAction', () => {
date: '2025-01-01',
} as unknown as Transaction;

const result = getSecondaryReportActions({currentUserEmail: EMPLOYEE_EMAIL, report, chatReport, reportTransactions: [transaction1, transaction2], violations: {}, policy});
const result = getSecondaryReportActions({
currentUserEmail: EMPLOYEE_EMAIL,
report,
chatReport,
reportTransactions: [transaction1, transaction2],
originalTransaction: {} as Transaction,
violations: {},
policy,
});
expect(result.includes(CONST.REPORT.SECONDARY_ACTIONS.SUBMIT)).toBe(true);
});

Expand All @@ -207,7 +215,15 @@ describe('getSecondaryAction', () => {
} as unknown as Policy;
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${REPORT_ID}`, report);

const result = getSecondaryReportActions({currentUserEmail: EMPLOYEE_EMAIL, report, chatReport, reportTransactions: [], violations: {}, policy});
const result = getSecondaryReportActions({
currentUserEmail: EMPLOYEE_EMAIL,
report,
chatReport,
reportTransactions: [],
originalTransaction: {} as Transaction,
violations: {},
policy,
});
expect(result.includes(CONST.REPORT.SECONDARY_ACTIONS.SUBMIT)).toBe(false);
});

Expand Down
Loading