Skip to content

Commit

Permalink
remove outdated test
Browse files Browse the repository at this point in the history
  • Loading branch information
perunt committed Mar 13, 2024
1 parent a0e96e1 commit ce55a7e
Showing 1 changed file with 0 additions and 110 deletions.
110 changes: 0 additions & 110 deletions tests/unit/ReportActionsUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,116 +305,6 @@ describe('ReportActionsUtils', () => {
expect(result).toStrictEqual(input);
});

describe('getSortedReportActionsForDisplay with marked the first reportAction', () => {
it('should filter out non-whitelisted actions', () => {
const input: ReportAction[] = [
{
created: '2022-11-13 22:27:01.825',
reportActionID: '8401445780099176',
actionName: CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
},
message: [
{
html: 'Hello world',
type: 'Action type',
text: 'Action text',
},
],
},
{
created: '2022-11-12 22:27:01.825',
reportActionID: '6401435781022176',
actionName: CONST.REPORT.ACTIONS.TYPE.CREATED,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
},
message: [
{
html: 'Hello world',
type: 'Action type',
text: 'Action text',
},
],
},
{
created: '2022-11-11 22:27:01.825',
reportActionID: '2962390724708756',
actionName: CONST.REPORT.ACTIONS.TYPE.IOU,
originalMessage: {
amount: 0,
currency: 'USD',
type: 'split', // change to const
},
message: [
{
html: 'Hello world',
type: 'Action type',
text: 'Action text',
},
],
},
{
created: '2022-11-10 22:27:01.825',
reportActionID: '1609646094152486',
actionName: CONST.REPORT.ACTIONS.TYPE.RENAMED,
originalMessage: {
html: 'Hello world',
lastModified: '2022-11-10 22:27:01.825',
oldName: 'old name',
newName: 'new name',
},
message: [
{
html: 'Hello world',
type: 'Action type',
text: 'Action text',
},
],
},
{
created: '2022-11-09 22:27:01.825',
reportActionID: '8049485084562457',
actionName: CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG.UPDATE_FIELD,
originalMessage: {},
message: [{html: 'updated the Approval Mode from "Submit and Approve" to "Submit and Close"', type: 'Action type', text: 'Action text'}],
},
{
created: '2022-11-08 22:27:06.825',
reportActionID: '1661970171066216',
actionName: CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENTQUEUED,
originalMessage: {
paymentType: 'ACH',
},
message: [{html: 'Waiting for the bank account', type: 'Action type', text: 'Action text'}],
},
{
created: '2022-11-06 22:27:08.825',
reportActionID: '1661970171066220',
actionName: CONST.REPORT.ACTIONS.TYPE.TASKEDITED,
originalMessage: {
html: 'Hello world',
whisperedTo: [],
},
message: [{html: 'I have changed the task', type: 'Action type', text: 'Action text'}],
},
];

const resultWithoutNewestFlag = ReportActionsUtils.getSortedReportActionsForDisplay(input);
const resultWithNewestFlag = ReportActionsUtils.getSortedReportActionsForDisplay(input, true);
input.pop();
// Mark the newest report action as the newest report action
resultWithoutNewestFlag[0] = {
...resultWithoutNewestFlag[0],
isNewestReportAction: true,
};
expect(resultWithoutNewestFlag).toStrictEqual(resultWithNewestFlag);
});
});

it('should filter out closed actions', () => {
const input: ReportAction[] = [
{
Expand Down

0 comments on commit ce55a7e

Please sign in to comment.