diff --git a/ui/pages/notifications/notification.test.js b/ui/pages/notifications/notification.test.js index b66a9113e..cf408b246 100644 --- a/ui/pages/notifications/notification.test.js +++ b/ui/pages/notifications/notification.test.js @@ -64,9 +64,10 @@ describe('Notifications', () => { }, }; - const { getByText } = render(mockStore); + const { getByText, getByRole } = render(mockStore); expect(getByText('Nothing to see here.')).toBeDefined(); + expect(getByRole('button', { name: 'Mark all as read' })).toBeDisabled(); }); }); diff --git a/ui/pages/notifications/notifications.js b/ui/pages/notifications/notifications.js index 3c485137a..f30fddd3b 100644 --- a/ui/pages/notifications/notifications.js +++ b/ui/pages/notifications/notifications.js @@ -99,6 +99,7 @@ export default function Notifications() { type="secondary" className="notifications__header_button" onClick={markAllAsRead} + disabled={unreadNotifications.length === 0} > {t('notificationsMarkAllAsRead')}