Skip to content

Commit 83bd322

Browse files
committed
small test fixes
1 parent 220e199 commit 83bd322

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

frontend/src/components/__tests__/NotificationCenter.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ describe('NotificationCenter', () => {
243243

244244
describe('mark as read', () => {
245245
it.each([
246-
{ status: 'unread' as const, shouldShow: true },
247-
{ status: 'read' as const, shouldShow: false },
248-
])('$shouldShow ? "shows" : "hides" Mark all as read when notifications are $status', async ({ status, shouldShow }) => {
246+
{ status: 'unread' as const, shouldShow: true, verb: 'shows' },
247+
{ status: 'read' as const, shouldShow: false, verb: 'hides' },
248+
])('$verb Mark all as read when notifications are $status', async ({ status, shouldShow }) => {
249249
setNotifications([createNotification({ status })]);
250250
await openDropdown();
251251
await waitFor(() => {

frontend/src/components/__tests__/ToastContainer.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,10 @@ describe('ToastContainer', () => {
9595
});
9696

9797
describe('accessibility', () => {
98-
it('toasts have role="alert" and container has positioning', async () => {
99-
const { container } = render(ToastContainer);
98+
it('toasts have role="alert" for screen reader announcement', async () => {
99+
render(ToastContainer);
100100
addToast('Accessible toast', 'info');
101-
102101
await waitFor(() => { expect(screen.getByRole('alert')).toBeInTheDocument(); });
103-
104-
const toastContainer = container.querySelector('.toasts-container');
105-
expect(toastContainer).toBeInTheDocument();
106-
expect(toastContainer).toHaveClass('toasts-container');
107102
});
108103
});
109104

0 commit comments

Comments
 (0)