Skip to content

Commit a85b3a0

Browse files
committed
fix: slots.test.tsx
1 parent 22e87d9 commit a85b3a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app-layout/__tests__/slots.test.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33
import React from 'react';
4+
import { waitFor } from '@testing-library/react';
45

56
import AppLayout from '../../../lib/components/app-layout';
67
import { describeEachAppLayout, renderComponent } from './utils';
@@ -16,11 +17,13 @@ describeEachAppLayout(() => {
1617
expect(notificationsEl).not.toHaveAttribute('aria-label');
1718
});
1819

19-
test('notifications can have aria-label', () => {
20+
test('notifications can have aria-label', async () => {
2021
const { wrapper } = renderComponent(
2122
<AppLayout notifications="abcd" ariaLabels={{ notifications: 'Notifications' }} />
2223
);
23-
expect(wrapper.findNotifications()!.getElement()).toHaveAttribute('aria-label', 'Notifications');
24+
await waitFor(() => {
25+
expect(wrapper.findNotifications()!.getElement()).toHaveAttribute('aria-label', 'Notifications');
26+
});
2427
});
2528
});
2629

0 commit comments

Comments
 (0)