Skip to content

Commit a5fc237

Browse files
authored
Merge pull request Expensify#79330 from hoangzinh/fix/79215-flaky-test
[NO QA] Fix flaky test in getReportOriginalCreationTimestamp
2 parents f410ae4 + 99a5883 commit a5fc237

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

tests/actions/IOUTest.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11784,13 +11784,19 @@ describe('actions/IOU', () => {
1178411784
it('should return timestamp from CREATED action when it exists', async () => {
1178511785
const createdTimestamp = '2024-01-15 12:00:00.000';
1178611786
const report = createRandomReport(1, undefined);
11787-
const reportAction1 = createRandomReportAction(1);
11788-
const reportAction2 = {
11789-
...createRandomReportAction(2),
11787+
const reportAction1 = {
11788+
...createRandomReportAction(1),
1179011789
actionName: CONST.REPORT.ACTIONS.TYPE.CREATED,
1179111790
created: createdTimestamp,
1179211791
};
11793-
const reportAction3 = createRandomReportAction(3);
11792+
const reportAction2 = {
11793+
...createRandomReportAction(2),
11794+
actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
11795+
};
11796+
const reportAction3 = {
11797+
...createRandomReportAction(3),
11798+
actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
11799+
};
1179411800

1179511801
await Onyx.multiSet({
1179611802
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
@@ -11812,7 +11818,10 @@ describe('actions/IOU', () => {
1181211818
...createRandomReport(1, undefined),
1181311819
created: reportCreatedTimestamp,
1181411820
};
11815-
const reportAction1 = createRandomReportAction(1);
11821+
const reportAction1 = {
11822+
...createRandomReportAction(1),
11823+
actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
11824+
};
1181611825

1181711826
await Onyx.multiSet({
1181811827
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,

0 commit comments

Comments
 (0)