forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ishpaul777/fix/ioutest
Fix/ioutest
- Loading branch information
Showing
4 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; | |
|
||
const ESH_EMAIL = '[email protected]'; | ||
const ESH_ACCOUNT_ID = 1; | ||
const ESH_PARTICIPANT: Participant = {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.DAILY, role: 'admin'}; | ||
const ESH_PARTICIPANT_ANNOUNCE_ROOM: Participant = {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.DAILY, role: 'admin'}; | ||
const ESH_PARTICIPANT_ADMINS_ROOM: Participant = {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, role: 'admin'}; | ||
const ESH_PARTICIPANT_EXPENSE_CHAT = {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, role: 'admin'} | ||
const WORKSPACE_NAME = "Esh's Workspace"; | ||
|
||
OnyxUpdateManager(); | ||
|
@@ -78,17 +80,19 @@ describe('actions/Policy', () => { | |
expect(workspaceReports.length).toBe(3); | ||
workspaceReports.forEach((report) => { | ||
expect(report?.pendingFields?.addWorkspaceRoom).toBe(CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD); | ||
expect(report?.participants).toEqual({[ESH_ACCOUNT_ID]: ESH_PARTICIPANT}); | ||
switch (report?.chatType) { | ||
case CONST.REPORT.CHAT_TYPE.POLICY_ADMINS: { | ||
expect(report?.participants).toEqual({ [ESH_ACCOUNT_ID]: ESH_PARTICIPANT_ADMINS_ROOM }); | ||
adminReportID = report.reportID; | ||
break; | ||
} | ||
case CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE: { | ||
expect(report?.participants).toEqual({ [ESH_ACCOUNT_ID]: ESH_PARTICIPANT_ANNOUNCE_ROOM }); | ||
announceReportID = report.reportID; | ||
break; | ||
} | ||
case CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT: { | ||
expect(report?.participants).toEqual({ [ESH_ACCOUNT_ID]: ESH_PARTICIPANT_EXPENSE_CHAT }); | ||
expenseReportID = report.reportID; | ||
break; | ||
} | ||
|