@@ -25,6 +25,7 @@ test('.toBeDisabled', () => {
2525 </optgroup>
2626 </select>
2727 </div>
28+ <a href="http://github.com" data-testid="deep-a-element">x</a>
2829 </fieldset>
2930
3031 <a href="http://github.com" disabled={true} data-testid="a-element">x</a>
@@ -50,7 +51,11 @@ test('.toBeDisabled', () => {
5051 expect ( queryByTestId ( 'deep-option-element' ) ) . toBeDisabled ( )
5152
5253 expect ( queryByTestId ( 'a-element' ) ) . not . toBeDisabled ( )
54+ expect ( queryByTestId ( 'deep-a-element' ) ) . not . toBeDisabled ( )
5355 expect ( ( ) => expect ( queryByTestId ( 'a-element' ) ) . toBeDisabled ( ) ) . toThrowError ( )
56+ expect ( ( ) =>
57+ expect ( queryByTestId ( 'deep-a-element' ) ) . toBeDisabled ( ) ,
58+ ) . toThrowError ( )
5459} )
5560
5661test ( '.toBeDisabled fieldset>legend' , ( ) => {
@@ -129,6 +134,7 @@ test('.toBeEnabled', () => {
129134 </optgroup>
130135 </select>
131136 </div>
137+ <a href="http://github.com" data-testid="deep-a-element">x</a>
132138 </fieldset>
133139
134140 <a href="http://github.com" disabled={true} data-testid="a-element">x</a>
@@ -173,6 +179,10 @@ test('.toBeEnabled', () => {
173179 expect ( ( ) =>
174180 expect ( queryByTestId ( 'a-element' ) ) . not . toBeEnabled ( ) ,
175181 ) . toThrowError ( )
182+ expect ( queryByTestId ( 'deep-a-element' ) ) . toBeEnabled ( )
183+ expect ( ( ) =>
184+ expect ( queryByTestId ( 'deep-a-element' ) ) . not . toBeEnabled ( ) ,
185+ ) . toThrowError ( )
176186} )
177187
178188test ( '.toBeEnabled fieldset>legend' , ( ) => {
0 commit comments