Skip to content

Commit 6a4bfe2

Browse files
committed
add unit test for memo message
1 parent 6fdba5f commit 6a4bfe2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/ui/PureReportActionItemTest.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ describe('PureReportActionItem', () => {
166166
expect(screen.getByText(translateLocal('iou.submitted', {}))).toBeOnTheScreen();
167167
});
168168

169+
it('SUBMITTED action with memo', async () => {
170+
const memo = 'memo message';
171+
const action = createReportAction(CONST.REPORT.ACTIONS.TYPE.SUBMITTED, {harvesting: false, message: memo});
172+
renderItemWithAction(action);
173+
await waitForBatchedUpdatesWithAct();
174+
175+
expect(screen.getByText(actorEmail)).toBeOnTheScreen();
176+
expect(screen.getByText(translateLocal('iou.submitted', {memo}))).toBeOnTheScreen();
177+
});
178+
169179
it('SUBMITTED_AND_CLOSED action', async () => {
170180
const action = createReportAction(CONST.REPORT.ACTIONS.TYPE.SUBMITTED_AND_CLOSED, {harvesting: false});
171181
renderItemWithAction(action);

0 commit comments

Comments
 (0)