diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts
index 74e4f1d9416..ff79ebaa9ad 100755
--- a/src/ONYXKEYS.ts
+++ b/src/ONYXKEYS.ts
@@ -568,9 +568,6 @@ const ONYXKEYS = {
/** Stores the information if mobile selection mode is active */
RAM_ONLY_MOBILE_SELECTION_MODE: 'mobileSelectionMode',
- /** Session-scoped flag: user dismissed the "enable notifications" banner in the Concierge chat */
- RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER: 'hasDismissedConciergeNotificationBanner',
-
NVP_PRIVATE_CANCELLATION_DETAILS: 'nvp_private_cancellationDetails',
/** Stores the information about duplicated workspace */
@@ -1587,7 +1584,6 @@ type OnyxValuesMapping = {
[ONYXKEYS.ADD_NEW_PERSONAL_CARD]: OnyxTypes.AddNewPersonalCard;
[ONYXKEYS.ASSIGN_CARD]: OnyxTypes.AssignCard;
[ONYXKEYS.RAM_ONLY_MOBILE_SELECTION_MODE]: boolean;
- [ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER]: boolean;
[ONYXKEYS.DUPLICATE_WORKSPACE]: OnyxTypes.DuplicateWorkspace;
[ONYXKEYS.COPY_POLICY_SETTINGS]: OnyxTypes.CopyPolicySettings;
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: string;
diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx
index ad2ca1595e6..f652653f910 100644
--- a/src/components/Banner.tsx
+++ b/src/components/Banner.tsx
@@ -53,9 +53,6 @@ type BannerProps = {
/** Callback called when pressing the button */
onButtonPress?: () => void;
-
- /** Custom action content rendered in the right side of the banner. Overrides the configured `shouldShowButton` when provided. */
- children?: React.ReactNode;
};
function Banner({
@@ -67,7 +64,6 @@ function Banner({
onButtonPress,
containerStyles,
textStyles,
- children,
shouldRenderHTML = false,
shouldShowIcon = false,
shouldShowCloseButton = false,
@@ -122,15 +118,14 @@ function Banner({
))}
- {children ??
- (shouldShowButton && (
-
- ))}
+ {shouldShowButton && (
+
+ )}
{shouldShowCloseButton && !!onClose && (
= {
concierge: {
collapseReasoning: 'Begründung einklappen',
expandReasoning: 'Begründung erweitern',
- enableNotifications: {prompt: 'Möchten Sie benachrichtigt werden, wenn Concierge antwortet?', cta: 'Benachrichtigen'},
},
supportalNoAccess: {
title: 'Nicht so schnell',
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 0f96b0e1b1f..47a1ad80e0b 100644
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -528,10 +528,6 @@ const translations = {
concierge: {
collapseReasoning: 'Collapse reasoning',
expandReasoning: 'Expand reasoning',
- enableNotifications: {
- prompt: 'Want to be notified when Concierge responds?',
- cta: 'Notify',
- },
},
supportalNoAccess: {
title: 'Not so fast',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a8717417154..aab502920ce 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -460,10 +460,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Contraer razonamiento',
expandReasoning: 'Expandir razonamiento',
- enableNotifications: {
- prompt: '¿Quieres que te avisemos cuando Concierge responda?',
- cta: 'Notificar',
- },
},
supportalNoAccess: {
title: 'No tan rápido',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 69a77bc5c1c..db93202c4e1 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -508,7 +508,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Réduire le raisonnement',
expandReasoning: 'Développer le raisonnement',
- enableNotifications: {prompt: 'Vous souhaitez être averti lorsque Concierge répond ?', cta: 'Notifier'},
},
supportalNoAccess: {
title: 'Pas si vite',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 15960393907..a3c1cf801e1 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -508,7 +508,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Comprimi ragionamento',
expandReasoning: 'Espandi ragionamento',
- enableNotifications: {prompt: 'Vuoi ricevere una notifica quando Concierge risponde?', cta: 'Notifica'},
},
supportalNoAccess: {
title: 'Non così in fretta',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index f58b76337ec..266697019ad 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -507,10 +507,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: '推論を折りたたむ',
expandReasoning: '推論を展開',
- enableNotifications: {
- prompt: 'Conciergeから返信があったときに通知を受け取りますか?',
- cta: '通知',
- },
},
supportalNoAccess: {
title: 'ちょっと待ってください',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 2aeba3345eb..1ff2288a907 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -507,7 +507,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Redenering inklappen',
expandReasoning: 'Redenering uitklappen',
- enableNotifications: {prompt: 'Wil je een melding krijgen wanneer Concierge reageert?', cta: 'Melden'},
},
supportalNoAccess: {
title: 'Niet zo snel',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index be09ee06a69..5789e6bfce2 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -507,7 +507,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Zwiń rozumowanie',
expandReasoning: 'Rozwiń rozumowanie',
- enableNotifications: {prompt: 'Chcesz otrzymywać powiadomienia, gdy Concierge odpowie?', cta: 'Powiadom'},
},
supportalNoAccess: {
title: 'Nie tak szybko',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index e72ee72ceb9..e04a7d14df0 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -506,7 +506,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: 'Recolher raciocínio',
expandReasoning: 'Expandir raciocínio',
- enableNotifications: {prompt: 'Quer ser avisado quando o Concierge responder?', cta: 'Notificar'},
},
supportalNoAccess: {
title: 'Calma aí',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 8c721598f08..a4f7fd7e73a 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -503,10 +503,6 @@ const translations: TranslationDeepObject = {
concierge: {
collapseReasoning: '收起推理',
expandReasoning: '展开推理',
- enableNotifications: {
- prompt: '希望在Concierge回复时收到通知吗?',
- cta: '通知',
- },
},
supportalNoAccess: {
title: '先别急',
diff --git a/src/libs/Notification/LocalNotification/BrowserNotifications.ts b/src/libs/Notification/LocalNotification/BrowserNotifications.ts
index c07ae378575..5379bdd6acc 100644
--- a/src/libs/Notification/LocalNotification/BrowserNotifications.ts
+++ b/src/libs/Notification/LocalNotification/BrowserNotifications.ts
@@ -5,7 +5,6 @@ import EXPENSIFY_ICON_URL from '@assets/images/expensify-logo-round-clearspace.p
import * as AppUpdate from '@libs/actions/AppUpdate';
import {translateLocal} from '@libs/Localize';
import {getForReportAction} from '@libs/ModifiedExpenseMessage';
-import NotificationPermission from '@libs/Notification/notificationPermission';
import {getTextFromHtml} from '@libs/ReportActionsUtils';
import {getReportName} from '@libs/ReportNameUtils';
import * as ReportUtils from '@libs/ReportUtils';
@@ -17,18 +16,28 @@ import type {LocalNotificationClickHandler, LocalNotificationData, LocalNotifica
const notificationCache: Record = {};
/**
- * Checks if the user has granted permission to show browser notifications, prompting them
- * if they have not yet decided.
+ * Checks if the user has granted permission to show browser notifications
*/
function canUseBrowserNotifications(): Promise {
- return NotificationPermission.getStatus().then((status) => {
- if (status === 'granted') {
- return true;
+ return new Promise((resolve) => {
+ // They have no browser notifications so we can't use this feature
+ if (!window.Notification) {
+ resolve(false);
+ return;
}
- if (status === 'denied') {
- return false;
+
+ // Check if they previously granted or denied us access to send a notification
+ const permissionGranted = Notification.permission === 'granted';
+
+ if (permissionGranted || Notification.permission === 'denied') {
+ resolve(permissionGranted);
+ return;
}
- return NotificationPermission.request().then((requested) => requested === 'granted');
+
+ // Check their global preferences for browser notifications and ask permission if they have none
+ Notification.requestPermission().then((status) => {
+ resolve(status === 'granted');
+ });
});
}
diff --git a/src/libs/Notification/notificationPermission/index.native.ts b/src/libs/Notification/notificationPermission/index.native.ts
deleted file mode 100644
index 29123ad3708..00000000000
--- a/src/libs/Notification/notificationPermission/index.native.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type NotificationPermissionModule from './types';
-
-const NotificationPermissionNative: NotificationPermissionModule = {
- getStatus: () => Promise.resolve('denied'),
- request: () => Promise.resolve('denied'),
-};
-
-export default NotificationPermissionNative;
diff --git a/src/libs/Notification/notificationPermission/index.ts b/src/libs/Notification/notificationPermission/index.ts
deleted file mode 100644
index d9a5fb7a436..00000000000
--- a/src/libs/Notification/notificationPermission/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import Log from '@libs/Log';
-import type NotificationPermissionModule from './types';
-import type {NotificationPermissionStatus} from './types';
-
-function toStatus(permission: NotificationPermission): NotificationPermissionStatus {
- if (permission === 'granted' || permission === 'denied') {
- return permission;
- }
- return 'default';
-}
-
-const NotificationPermission: NotificationPermissionModule = {
- getStatus(): Promise {
- if (typeof window === 'undefined' || !window.Notification) {
- return Promise.resolve('denied');
- }
- return Promise.resolve(toStatus(Notification.permission));
- },
-
- request(): Promise {
- if (typeof window === 'undefined' || !window.Notification) {
- return Promise.resolve('denied');
- }
- return Notification.requestPermission()
- .then(toStatus)
- .catch((error: unknown) => {
- Log.warn('[NotificationPermission] request failed', {error: String(error)});
- return 'denied';
- });
- },
-};
-
-export default NotificationPermission;
diff --git a/src/libs/Notification/notificationPermission/types.ts b/src/libs/Notification/notificationPermission/types.ts
deleted file mode 100644
index 9ffca38417a..00000000000
--- a/src/libs/Notification/notificationPermission/types.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-type NotificationPermissionStatus = 'granted' | 'denied' | 'default';
-
-type NotificationPermissionModule = {
- getStatus: () => Promise;
- request: () => Promise;
-};
-
-export default NotificationPermissionModule;
-export type {NotificationPermissionStatus};
diff --git a/src/libs/actions/ConciergeNotificationBanner.ts b/src/libs/actions/ConciergeNotificationBanner.ts
deleted file mode 100644
index cd12ebe8638..00000000000
--- a/src/libs/actions/ConciergeNotificationBanner.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import Onyx from 'react-native-onyx';
-import ONYXKEYS from '@src/ONYXKEYS';
-
-function dismissForSession() {
- Onyx.set(ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER, true);
-}
-
-export {
- // eslint-disable-next-line import/prefer-default-export -- Action files in src/libs/actions/ use named exports by convention so callers stay consistent as more actions are added
- dismissForSession,
-};
diff --git a/src/pages/inbox/report/EnableNotificationsBanner.tsx b/src/pages/inbox/report/EnableNotificationsBanner.tsx
deleted file mode 100644
index 6d41a965f0a..00000000000
--- a/src/pages/inbox/report/EnableNotificationsBanner.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React from 'react';
-import {View} from 'react-native';
-import Banner from '@components/Banner';
-import Button from '@components/Button';
-import useLocalize from '@hooks/useLocalize';
-import useThemeStyles from '@hooks/useThemeStyles';
-import {dismissForSession} from '@libs/actions/ConciergeNotificationBanner';
-import NotificationPermission from '@libs/Notification/notificationPermission';
-import variables from '@styles/variables';
-import CONST from '@src/CONST';
-
-// Visual breathing room hidden behind the composer in addition to the corner-radius arc.
-const BANNER_EXTRA_OVERLAP_PX = 8;
-// Composer overlaps this banner; the overlap must be ≥ the composer's corner radius.
-const BANNER_COMPOSER_OVERLAP_PX = variables.componentBorderRadiusRounded + BANNER_EXTRA_OVERLAP_PX;
-const BANNER_VISIBLE_BOTTOM_GAP_PX = 12;
-
-const containerOverrideStyle = {
- paddingBottom: BANNER_VISIBLE_BOTTOM_GAP_PX + BANNER_COMPOSER_OVERLAP_PX,
- borderRadius: 0,
- borderTopLeftRadius: variables.componentBorderRadiusLarge,
- borderTopRightRadius: variables.componentBorderRadiusLarge,
-};
-
-function requestAndDismiss() {
- NotificationPermission.request().then(dismissForSession);
-}
-
-function EnableNotificationsBanner() {
- const styles = useThemeStyles();
- const {translate} = useLocalize();
-
- return (
-
-
-
-
-
-
- );
-}
-
-EnableNotificationsBanner.displayName = 'EnableNotificationsBanner';
-
-export default EnableNotificationsBanner;
-export {BANNER_COMPOSER_OVERLAP_PX};
diff --git a/src/pages/inbox/report/ReportFooter.tsx b/src/pages/inbox/report/ReportFooter.tsx
index ab26c755e5f..e61c585d3fc 100644
--- a/src/pages/inbox/report/ReportFooter.tsx
+++ b/src/pages/inbox/report/ReportFooter.tsx
@@ -31,16 +31,12 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import {isLoadingInitialReportActionsSelector} from '@src/selectors/ReportMetaData';
import type * as OnyxTypes from '@src/types/onyx';
-import EnableNotificationsBanner, {BANNER_COMPOSER_OVERLAP_PX} from './EnableNotificationsBanner';
import ReportActionCompose from './ReportActionCompose/ReportActionCompose';
import SystemChatReportFooterMessage from './SystemChatReportFooterMessage';
import useShouldShowComposerForActiveEditDraft from './useShouldShowComposerForActiveEditDraft';
-import useShouldShowEnableNotificationsBanner from './useShouldShowEnableNotificationsBanner';
const policyRoleSelector = (policy: OnyxEntry) => policy?.role;
-const composerOverlapStyle = {marginTop: -BANNER_COMPOSER_OVERLAP_PX};
-
/**
* Footer component that decides between the composer and
* archived/anonymous/blocked/system chat/admins-only footer.
@@ -75,7 +71,6 @@ function ReportFooter() {
const isUserPolicyAdmin = policyRole === CONST.POLICY.ROLE.ADMIN;
const isArchivedRoom = isArchivedNonExpenseReport(report, isReportArchived);
- const shouldShowEnableNotificationsBanner = useShouldShowEnableNotificationsBanner(reportIDFromRoute);
const shouldShowComposerOptimistically = !isAnonymousUser && isPublicRoom(report) && !!isLoadingInitialReportActions;
const canPerformWriteAction = canUserPerformWriteAction(report, isReportArchived) ?? shouldShowComposerOptimistically;
@@ -95,12 +90,9 @@ function ReportFooter() {
if (!shouldHideComposer) {
return (
- {shouldShowEnableNotificationsBanner && }
-
-
-
-
-
+
+
+
);
}
diff --git a/src/pages/inbox/report/useShouldShowEnableNotificationsBanner.ts b/src/pages/inbox/report/useShouldShowEnableNotificationsBanner.ts
deleted file mode 100644
index 69ec25126fb..00000000000
--- a/src/pages/inbox/report/useShouldShowEnableNotificationsBanner.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import {useEffect, useState} from 'react';
-import useOnyx from '@hooks/useOnyx';
-import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
-import NotificationPermission from '@libs/Notification/notificationPermission';
-import type {NotificationPermissionStatus} from '@libs/Notification/notificationPermission/types';
-import {isConciergeChatReport} from '@libs/ReportUtils';
-import ONYXKEYS from '@src/ONYXKEYS';
-
-function useShouldShowEnableNotificationsBanner(reportID: string | undefined): boolean {
- const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(reportID)}`);
- const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
- const [hasDismissed] = useOnyx(ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER);
- const [permissionStatus, setPermissionStatus] = useState();
-
- const isConcierge = !!reportID && isConciergeChatReport(report, conciergeReportID);
-
- useEffect(() => {
- if (!isConcierge || hasDismissed) {
- return;
- }
- let isMounted = true;
- NotificationPermission.getStatus().then((status) => {
- if (!isMounted) {
- return;
- }
- setPermissionStatus(status);
- });
- return () => {
- isMounted = false;
- };
- }, [isConcierge, hasDismissed]);
-
- return isConcierge && !hasDismissed && permissionStatus === 'default';
-}
-
-export default useShouldShowEnableNotificationsBanner;
diff --git a/src/setup/index.ts b/src/setup/index.ts
index a912a25fbdd..455c516cc73 100644
--- a/src/setup/index.ts
+++ b/src/setup/index.ts
@@ -70,7 +70,6 @@ export default function () {
ONYXKEYS.RAM_ONLY_PLAID_LINK_TOKEN,
ONYXKEYS.RAM_ONLY_MERGE_HR_LINK_TOKEN,
ONYXKEYS.COLLECTION.RAM_ONLY_ISSUE_NEW_EXPENSIFY_CARD,
- ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER,
ONYXKEYS.RAM_ONLY_DOMAIN_MEMBERS_SELECTED_FOR_MOVE,
],
});
diff --git a/tests/actions/ConciergeNotificationBannerTest.ts b/tests/actions/ConciergeNotificationBannerTest.ts
deleted file mode 100644
index 41902f3e15d..00000000000
--- a/tests/actions/ConciergeNotificationBannerTest.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import Onyx from 'react-native-onyx';
-import {dismissForSession} from '@libs/actions/ConciergeNotificationBanner';
-import ONYXKEYS from '@src/ONYXKEYS';
-import getOnyxValue from '../utils/getOnyxValue';
-import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
-
-describe('ConciergeNotificationBanner', () => {
- beforeAll(() => {
- Onyx.init({keys: ONYXKEYS});
- });
-
- beforeEach(async () => {
- await Onyx.clear();
- });
-
- describe('dismissForSession', () => {
- it('writes true to the RAM-only dismissal flag', async () => {
- dismissForSession();
- await waitForBatchedUpdates();
- const value = await getOnyxValue(ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER);
- expect(value).toBe(true);
- });
- });
-});
diff --git a/tests/unit/EnableNotificationsBannerTest.tsx b/tests/unit/EnableNotificationsBannerTest.tsx
deleted file mode 100644
index dfc3000c07f..00000000000
--- a/tests/unit/EnableNotificationsBannerTest.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-import {fireEvent, render, screen} from '@testing-library/react-native';
-import React from 'react';
-import Onyx from 'react-native-onyx';
-import {LocaleContextProvider} from '@components/LocaleContextProvider';
-import OnyxListItemProvider from '@components/OnyxListItemProvider';
-import {dismissForSession} from '@libs/actions/ConciergeNotificationBanner';
-import type {NotificationPermissionStatus} from '@libs/Notification/notificationPermission/types';
-import EnableNotificationsBanner from '@pages/inbox/report/EnableNotificationsBanner';
-import ONYXKEYS from '@src/ONYXKEYS';
-import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct';
-
-let mockRequestResult: NotificationPermissionStatus = 'default';
-const mockRequest = jest.fn(() => Promise.resolve(mockRequestResult));
-
-jest.mock('@libs/Notification/notificationPermission', () => ({
- __esModule: true,
- default: {
- getStatus: () => Promise.resolve('default' as NotificationPermissionStatus),
- request: () => mockRequest(),
- },
-}));
-
-jest.mock('@libs/actions/ConciergeNotificationBanner', () => ({
- dismissForSession: jest.fn(),
-}));
-
-function renderBanner() {
- return render(
-
-
-
-
- ,
- );
-}
-
-describe('EnableNotificationsBanner', () => {
- beforeAll(() => {
- Onyx.init({keys: ONYXKEYS});
- });
-
- beforeEach(async () => {
- jest.clearAllMocks();
- mockRequestResult = 'default';
- await Onyx.clear();
- });
-
- it('renders the prompt text and both action buttons', async () => {
- renderBanner();
- await waitForBatchedUpdatesWithAct();
- expect(screen.getByText('Want to be notified when Concierge responds?')).toBeOnTheScreen();
- expect(screen.getByText('Notify')).toBeOnTheScreen();
- expect(screen.getByText('Not now')).toBeOnTheScreen();
- });
-
- it('calls dismissForSession when "Not now" is pressed', async () => {
- renderBanner();
- await waitForBatchedUpdatesWithAct();
- fireEvent.press(screen.getByText('Not now'));
- expect(dismissForSession).toHaveBeenCalledTimes(1);
- });
-
- it('requests permission when "Notify" is pressed and dismisses on grant', async () => {
- mockRequestResult = 'granted';
- renderBanner();
- await waitForBatchedUpdatesWithAct();
- fireEvent.press(screen.getByText('Notify'));
- await waitForBatchedUpdatesWithAct();
- expect(mockRequest).toHaveBeenCalledTimes(1);
- expect(dismissForSession).toHaveBeenCalledTimes(1);
- });
-
- it('dismisses after request even when permission is denied so the banner does not get stuck', async () => {
- mockRequestResult = 'denied';
- renderBanner();
- await waitForBatchedUpdatesWithAct();
- fireEvent.press(screen.getByText('Notify'));
- await waitForBatchedUpdatesWithAct();
- expect(mockRequest).toHaveBeenCalledTimes(1);
- expect(dismissForSession).toHaveBeenCalledTimes(1);
- });
-});
diff --git a/tests/unit/hooks/useShouldShowEnableNotificationsBanner.test.ts b/tests/unit/hooks/useShouldShowEnableNotificationsBanner.test.ts
deleted file mode 100644
index d11b045fcc5..00000000000
--- a/tests/unit/hooks/useShouldShowEnableNotificationsBanner.test.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import {renderHook, waitFor} from '@testing-library/react-native';
-import Onyx from 'react-native-onyx';
-import type {NotificationPermissionStatus} from '@libs/Notification/notificationPermission/types';
-import useShouldShowEnableNotificationsBanner from '@pages/inbox/report/useShouldShowEnableNotificationsBanner';
-import ONYXKEYS from '@src/ONYXKEYS';
-
-const CONCIERGE_REPORT_ID = '1';
-const OTHER_REPORT_ID = '2';
-
-let mockCurrentPermission: NotificationPermissionStatus = 'default';
-
-jest.mock('@libs/Notification/notificationPermission', () => ({
- __esModule: true,
- default: {
- getStatus: () => Promise.resolve(mockCurrentPermission),
- request: () => Promise.resolve(mockCurrentPermission),
- },
-}));
-
-describe('useShouldShowEnableNotificationsBanner', () => {
- beforeAll(() => {
- Onyx.init({keys: ONYXKEYS});
- });
-
- beforeEach(async () => {
- mockCurrentPermission = 'default';
- await Onyx.clear();
- await Onyx.merge(ONYXKEYS.CONCIERGE_REPORT_ID, CONCIERGE_REPORT_ID);
- await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${CONCIERGE_REPORT_ID}`, {reportID: CONCIERGE_REPORT_ID});
- await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${OTHER_REPORT_ID}`, {reportID: OTHER_REPORT_ID});
- });
-
- it('returns false when reportID is undefined', async () => {
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(undefined));
- await waitFor(() => expect(result.current).toBe(false));
- });
-
- it('returns false in a non-Concierge report', async () => {
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(OTHER_REPORT_ID));
- await waitFor(() => expect(result.current).toBe(false));
- });
-
- it('returns false when the user has already dismissed the banner this session', async () => {
- await Onyx.set(ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER, true);
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(CONCIERGE_REPORT_ID));
- await waitFor(() => expect(result.current).toBe(false));
- });
-
- it('returns false when notifications are already granted', async () => {
- mockCurrentPermission = 'granted';
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(CONCIERGE_REPORT_ID));
- // Give the async probe a tick to resolve, then assert it stays false.
- await waitFor(() => expect(result.current).toBe(false));
- });
-
- it('returns false when notifications are denied', async () => {
- mockCurrentPermission = 'denied';
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(CONCIERGE_REPORT_ID));
- await waitFor(() => expect(result.current).toBe(false));
- });
-
- it('returns true in the Concierge report when permission is default and not dismissed', async () => {
- const {result} = renderHook(() => useShouldShowEnableNotificationsBanner(CONCIERGE_REPORT_ID));
- await waitFor(() => expect(result.current).toBe(true));
- });
-});