File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
import React from 'react' ;
4
+ import { waitFor } from '@testing-library/react' ;
4
5
5
6
import AppLayout from '../../../lib/components/app-layout' ;
6
7
import { describeEachAppLayout , renderComponent } from './utils' ;
@@ -16,11 +17,13 @@ describeEachAppLayout(() => {
16
17
expect ( notificationsEl ) . not . toHaveAttribute ( 'aria-label' ) ;
17
18
} ) ;
18
19
19
- test ( 'notifications can have aria-label' , ( ) => {
20
+ test ( 'notifications can have aria-label' , async ( ) => {
20
21
const { wrapper } = renderComponent (
21
22
< AppLayout notifications = "abcd" ariaLabels = { { notifications : 'Notifications' } } />
22
23
) ;
23
- expect ( wrapper . findNotifications ( ) ! . getElement ( ) ) . toHaveAttribute ( 'aria-label' , 'Notifications' ) ;
24
+ await waitFor ( ( ) => {
25
+ expect ( wrapper . findNotifications ( ) ! . getElement ( ) ) . toHaveAttribute ( 'aria-label' , 'Notifications' ) ;
26
+ } ) ;
24
27
} ) ;
25
28
} ) ;
26
29
You can’t perform that action at this time.
0 commit comments