mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
[FLASK] disable "Mark all as read button" when there are no notifications (#15333)
* [Flask] disable "Mark all as read button" when there are no notifications * Adding test case * Addressing feedback
This commit is contained in:
parent
e12d0a94e8
commit
c677edc51d
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -99,6 +99,7 @@ export default function Notifications() {
|
||||
type="secondary"
|
||||
className="notifications__header_button"
|
||||
onClick={markAllAsRead}
|
||||
disabled={unreadNotifications.length === 0}
|
||||
>
|
||||
{t('notificationsMarkAllAsRead')}
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user