This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/chakra-ui-core/src/CCircularProgress/tests Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { CCircularProgress , CCircularProgressLabel } from '../..'
2
- import { render } from '@/tests/test-utils'
2
+ import { render , screen } from '@/tests/test-utils'
3
3
4
4
const renderComponent = ( props ) => {
5
5
const base = {
@@ -20,26 +20,26 @@ it('should render correctly', () => {
20
20
} )
21
21
22
22
it ( 'should display a label' , ( ) => {
23
- const { queryByText } = renderComponent ( {
23
+ renderComponent ( {
24
24
template : `
25
25
<CCircularProgress :value="40">
26
26
<CCircularProgressLabel>40%</CCircularProgressLabel>
27
27
</CCircularProgress>`
28
28
} )
29
29
30
- expect ( queryByText ( '40%' ) ) . toBeInTheDocument ( )
30
+ expect ( screen . getByText ( '40%' ) ) . toBeInTheDocument ( )
31
31
} )
32
32
33
33
test ( 'a11y - progress has a "role" set to "progressbar"' , ( ) => {
34
- const { queryByRole } = renderComponent ( )
34
+ renderComponent ( )
35
35
36
- expect ( queryByRole ( 'progressbar' ) ) . toBeInTheDocument ( )
36
+ expect ( screen . queryByRole ( 'progressbar' ) ) . toBeInTheDocument ( )
37
37
} )
38
38
39
39
test ( 'a11y - progress has a "aria-valuenow" set to the percentage completion value' , ( ) => {
40
- const { queryByTestId } = renderComponent ( )
40
+ renderComponent ( )
41
41
42
- expect ( queryByTestId ( 'CircularProgress' ) ) . toHaveAttribute (
42
+ expect ( screen . queryByTestId ( 'CircularProgress' ) ) . toHaveAttribute (
43
43
'aria-valuenow' ,
44
44
'40'
45
45
)
You can’t perform that action at this time.
0 commit comments