@@ -25,6 +25,7 @@ test('.toBeDisabled', () => {
25
25
</optgroup>
26
26
</select>
27
27
</div>
28
+ <a href="http://github.com" data-testid="deep-a-element">x</a>
28
29
</fieldset>
29
30
30
31
<a href="http://github.com" disabled={true} data-testid="a-element">x</a>
@@ -50,7 +51,11 @@ test('.toBeDisabled', () => {
50
51
expect ( queryByTestId ( 'deep-option-element' ) ) . toBeDisabled ( )
51
52
52
53
expect ( queryByTestId ( 'a-element' ) ) . not . toBeDisabled ( )
54
+ expect ( queryByTestId ( 'deep-a-element' ) ) . not . toBeDisabled ( )
53
55
expect ( ( ) => expect ( queryByTestId ( 'a-element' ) ) . toBeDisabled ( ) ) . toThrowError ( )
56
+ expect ( ( ) =>
57
+ expect ( queryByTestId ( 'deep-a-element' ) ) . toBeDisabled ( ) ,
58
+ ) . toThrowError ( )
54
59
} )
55
60
56
61
test ( '.toBeDisabled fieldset>legend' , ( ) => {
@@ -129,6 +134,7 @@ test('.toBeEnabled', () => {
129
134
</optgroup>
130
135
</select>
131
136
</div>
137
+ <a href="http://github.com" data-testid="deep-a-element">x</a>
132
138
</fieldset>
133
139
134
140
<a href="http://github.com" disabled={true} data-testid="a-element">x</a>
@@ -173,6 +179,10 @@ test('.toBeEnabled', () => {
173
179
expect ( ( ) =>
174
180
expect ( queryByTestId ( 'a-element' ) ) . not . toBeEnabled ( ) ,
175
181
) . toThrowError ( )
182
+ expect ( queryByTestId ( 'deep-a-element' ) ) . toBeEnabled ( )
183
+ expect ( ( ) =>
184
+ expect ( queryByTestId ( 'deep-a-element' ) ) . not . toBeEnabled ( ) ,
185
+ ) . toThrowError ( )
176
186
} )
177
187
178
188
test ( '.toBeEnabled fieldset>legend' , ( ) => {
0 commit comments