@@ -6,11 +6,11 @@ import '../extend-expect';
6
6
test ( 'toBeBusy() basic case' , ( ) => {
7
7
render (
8
8
< >
9
- < View testID = "busy" accessible accessibilityState = { { busy : true } } />
10
- < View testID = "busy-aria" accessible aria-busy />
11
- < View testID = "not-busy" accessible accessibilityState = { { busy : false } } />
12
- < View testID = "not-busy-aria" accessible aria-busy = { false } />
13
- < View testID = "default" accessible />
9
+ < View testID = "busy" accessibilityState = { { busy : true } } />
10
+ < View testID = "busy-aria" aria-busy />
11
+ < View testID = "not-busy" accessibilityState = { { busy : false } } />
12
+ < View testID = "not-busy-aria" aria-busy = { false } />
13
+ < View testID = "default" />
14
14
</ >
15
15
) ;
16
16
@@ -24,11 +24,11 @@ test('toBeBusy() basic case', () => {
24
24
test ( 'toBeBusy() error messages' , ( ) => {
25
25
render (
26
26
< >
27
- < View testID = "busy" accessible accessibilityState = { { busy : true } } />
28
- < View testID = "busy-aria" accessible aria-busy />
29
- < View testID = "not-busy" accessible accessibilityState = { { busy : false } } />
30
- < View testID = "not-busy-aria" accessible aria-busy = { false } />
31
- < View testID = "default" accessible />
27
+ < View testID = "busy" accessibilityState = { { busy : true } } />
28
+ < View testID = "busy-aria" aria-busy />
29
+ < View testID = "not-busy" accessibilityState = { { busy : false } } />
30
+ < View testID = "not-busy-aria" aria-busy = { false } />
31
+ < View testID = "default" />
32
32
</ >
33
33
) ;
34
34
@@ -43,7 +43,6 @@ test('toBeBusy() error messages', () => {
43
43
"busy": true,
44
44
}
45
45
}
46
- accessible={true}
47
46
testID="busy"
48
47
/>"
49
48
` ) ;
@@ -54,7 +53,6 @@ test('toBeBusy() error messages', () => {
54
53
55
54
Received element is busy:
56
55
<View
57
- accessible={true}
58
56
aria-busy={true}
59
57
testID="busy-aria"
60
58
/>"
@@ -71,7 +69,6 @@ test('toBeBusy() error messages', () => {
71
69
"busy": false,
72
70
}
73
71
}
74
- accessible={true}
75
72
testID="not-busy"
76
73
/>"
77
74
` ) ;
@@ -82,7 +79,6 @@ test('toBeBusy() error messages', () => {
82
79
83
80
Received element is not busy:
84
81
<View
85
- accessible={true}
86
82
aria-busy={false}
87
83
testID="not-busy-aria"
88
84
/>"
@@ -94,37 +90,7 @@ test('toBeBusy() error messages', () => {
94
90
95
91
Received element is not busy:
96
92
<View
97
- accessible={true}
98
93
testID="default"
99
94
/>"
100
95
` ) ;
101
96
} ) ;
102
-
103
- test ( 'toBeBusy() requires accessibility elements' , ( ) => {
104
- render (
105
- < >
106
- < View testID = "busy-aria" aria-busy />
107
- < View testID = "not-busy-aria" aria-busy = { false } />
108
- < View testID = "default" />
109
- </ >
110
- ) ;
111
-
112
- expect ( ( ) => expect ( screen . getByTestId ( 'busy-aria' ) ) . toBeBusy ( ) )
113
- . toThrowErrorMatchingInlineSnapshot ( `
114
- "expect(element).toBeBusy()
115
-
116
- Received element is not busy:
117
- <View
118
- aria-busy={true}
119
- testID="busy-aria"
120
- />"
121
- ` ) ;
122
-
123
- expect ( ( ) =>
124
- expect ( screen . getByTestId ( 'not-busy-aria' ) ) . not . toBeBusy ( )
125
- ) . toThrowErrorMatchingInlineSnapshot ( ) ;
126
-
127
- expect ( ( ) =>
128
- expect ( screen . getByTestId ( 'default' ) ) . not . toBeBusy ( )
129
- ) . toThrowErrorMatchingInlineSnapshot ( ) ;
130
- } ) ;
0 commit comments