diff --git a/src/components/VideoPlayer/index.js b/src/components/VideoPlayer/index.js index a46afa70a3d2..c51e9bd680e1 100644 --- a/src/components/VideoPlayer/index.js +++ b/src/components/VideoPlayer/index.js @@ -16,4 +16,4 @@ VideoPlayer.displayName = 'VideoPlayer'; VideoPlayer.propTypes = videoPlayerPropTypes; VideoPlayer.defaultProps = videoPlayerDefaultProps; -export default forwardRef(VideoPlayer); \ No newline at end of file +export default forwardRef(VideoPlayer); diff --git a/tests/utils/LHNTestUtils.tsx b/tests/utils/LHNTestUtils.tsx index 85c2d67f80bc..44bfcd46d399 100644 --- a/tests/utils/LHNTestUtils.tsx +++ b/tests/utils/LHNTestUtils.tsx @@ -142,11 +142,14 @@ function getFakeReport(participantAccountIDs = [1, 2], millisecondsInThePast = 0 function getFakeReportAction(actor = 'email1@test.com', millisecondsInThePast = 0): ReportAction { const timestamp = Date.now() - millisecondsInThePast; const created = DateUtils.getDBTime(timestamp); + const previousReportActionID = lastFakeReportActionID; + const reportActionID = ++lastFakeReportActionID; return { actor, actorAccountID: 1, - reportActionID: `${++lastFakeReportActionID}`, + reportActionID: `${reportActionID}`, + previousReportActionID: `${previousReportActionID}`, actionName: CONST.REPORT.ACTIONS.TYPE.CREATED, shouldShow: true, created, @@ -183,7 +186,7 @@ function getFakeReportAction(actor = 'email1@test.com', millisecondsInThePast = }, ], originalMessage: { - childReportID: `${++lastFakeReportActionID}`, + childReportID: `${reportActionID}`, emojiReactions: { heart: { createdAt: '2023-08-28 15:27:52', diff --git a/tests/utils/ReportTestUtils.ts b/tests/utils/ReportTestUtils.ts index 0fd54a1aa0ac..59964cc5c7ab 100644 --- a/tests/utils/ReportTestUtils.ts +++ b/tests/utils/ReportTestUtils.ts @@ -39,8 +39,8 @@ const getFakeReportAction = (index: number, actionName?: ActionName): ReportActi text: 'email@test.com', }, ], - previousReportActionID: (index === 0 ? 0 : index - 1).toString(), reportActionID: index.toString(), + previousReportActionID: (index === 0 ? 0 : index - 1).toString(), reportActionTimestamp: 1696243169753, sequenceNumber: 0, shouldShow: true, @@ -48,7 +48,11 @@ const getFakeReportAction = (index: number, actionName?: ActionName): ReportActi whisperedToAccountIDs: [], } as ReportAction); -const getMockedSortedReportActions = (length = 100): ReportAction[] => Array.from({length}, (element, index): ReportAction => getFakeReportAction(index)); +const getMockedSortedReportActions = (length = 100): ReportAction[] => + Array.from({length}, (element, index): ReportAction => { + const actionName: ActionName = index === 0 ? 'CREATED' : 'ADDCOMMENT'; + return getFakeReportAction(index + 1, actionName); + }).reverse(); const getMockedReportActionsMap = (length = 100): ReportActions => { const mockReports: ReportActions[] = Array.from({length}, (element, index): ReportActions => { @@ -57,6 +61,7 @@ const getMockedReportActionsMap = (length = 100): ReportActions => { const reportAction = { ...createRandomReportAction(reportID), actionName, + previousReportActionID: index.toString(), originalMessage: { linkedReportID: reportID.toString(), }, diff --git a/tests/utils/collections/reportActions.ts b/tests/utils/collections/reportActions.ts index dcfa896f1ae4..f19e939083d2 100644 --- a/tests/utils/collections/reportActions.ts +++ b/tests/utils/collections/reportActions.ts @@ -33,7 +33,7 @@ export default function createRandomReportAction(index: number): ReportAction { // eslint-disable-next-line @typescript-eslint/no-explicit-any actionName: rand(flattenActionNamesValues(CONST.REPORT.ACTIONS.TYPE)) as any, reportActionID: index.toString(), - previousReportActionID: index.toString(), + previousReportActionID: (index === 0 ? 0 : index - 1).toString(), actorAccountID: index, person: [ {