File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,7 @@ describe('<pf-tabs>', function() {
243243 } ) ;
244244
245245 it ( 'should specify the selected tab to assistive technology' , async function ( ) {
246- const snapshot = await a11ySnapshot ( ) ;
247- expect ( snapshot . children ?. find ( x => x . role === 'tabpanel' ) ?. name ) . to . equal ( 'tab-2' ) ;
246+ expect ( await a11ySnapshot ( ) ) . to . axContainQuery ( { role : 'tabpanel' , name : 'tab-2' } ) ;
248247 } ) ;
249248 } ) ;
250249
@@ -261,8 +260,7 @@ describe('<pf-tabs>', function() {
261260 } ) ;
262261
263262 it ( 'should specify the selected tab to assistive technology' , async function ( ) {
264- const snapshot = await a11ySnapshot ( ) ;
265- expect ( snapshot . children ?. find ( x => x . role === 'tabpanel' ) ?. name ) . to . equal ( 'tab-3' ) ;
263+ expect ( await a11ySnapshot ( ) ) . to . axContainQuery ( { role : 'tabpanel' , name : 'tab-3' } ) ;
266264 } ) ;
267265
268266 describe ( 'then pressing ArrowRight' , function ( ) {
@@ -280,8 +278,7 @@ describe('<pf-tabs>', function() {
280278 } ) ;
281279
282280 it ( 'should specify the selected tab to assistive technology' , async function ( ) {
283- const snapshot = await a11ySnapshot ( ) ;
284- expect ( snapshot . children ?. find ( x => x . role === 'tabpanel' ) ?. name ) . to . equal ( 'tab-1' ) ;
281+ expect ( await a11ySnapshot ( ) ) . to . axContainQuery ( { role : 'tabpanel' , name : 'tab-1' } ) ;
285282 } ) ;
286283 } ) ;
287284 } ) ;
You can’t perform that action at this time.
0 commit comments