From cc6e23cdade680c8a344b691637d8ab7283ee19a Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Mon, 2 Jun 2025 19:19:36 +0200 Subject: [PATCH 1/2] Hardcode return value for the table reprot views --- src/libs/Permissions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 45bba456169f..fc66720ca192 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -50,8 +50,11 @@ function canUseCustomRules(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.CUSTOM_RULES) || canUseAllBetas(betas); } +/** + * The feature is released so hardcoding the value to true while we clean up the beta from the code. + */ function canUseTableReportView(betas: OnyxEntry): boolean { - return !!betas?.includes(CONST.BETAS.TABLE_REPORT_VIEW) || canUseAllBetas(betas); + return true || !!betas?.includes(CONST.BETAS.TABLE_REPORT_VIEW) || canUseAllBetas(betas); } function canUseTalkToAISales(betas: OnyxEntry): boolean { From c4c831bf1c4de185d62ae7b880cfd05cb9cbeef6 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Mon, 2 Jun 2025 19:30:49 +0200 Subject: [PATCH 2/2] Remove redundant tests --- tests/actions/IOUTest.ts | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index 6ba4aa411f96..5232f61b3b2b 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -1589,26 +1589,6 @@ describe('actions/IOU', () => { }); expect(notifyNewAction).toHaveBeenCalledTimes(1); }); - - it('trigger notifyNewAction when doing the money request without canUseTableReportView permission', () => { - requestMoney({ - report: {reportID: '123', type: CONST.REPORT.TYPE.EXPENSE}, - participantParams: { - payeeEmail: RORY_EMAIL, - payeeAccountID: RORY_ACCOUNT_ID, - participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID}, - }, - transactionParams: { - amount: 1, - attendees: [], - currency: CONST.CURRENCY.USD, - created: '', - merchant: '', - comment: '', - }, - }); - expect(notifyNewAction).toHaveBeenCalledTimes(1); - }); }); describe('createDistanceRequest', () => { @@ -1647,23 +1627,6 @@ describe('actions/IOU', () => { }); expect(notifyNewAction).toHaveBeenCalledTimes(1); }); - - it('trigger notifyNewAction when doing the money request without canUseTableReportView permission', () => { - createDistanceRequest({ - report: {reportID: '123', type: CONST.REPORT.TYPE.EXPENSE}, - participants: [], - transactionParams: { - amount: 1, - attendees: [], - currency: CONST.CURRENCY.USD, - created: '', - merchant: '', - comment: '', - validWaypoints: {}, - }, - }); - expect(notifyNewAction).toHaveBeenCalledTimes(1); - }); }); describe('split expense', () => {