11import TreeList from 'devextreme-testcafe-models/treeList' ;
22import { createWidget } from '../../../helpers/createWidget' ;
33import url from '../../../helpers/getPageUrl' ;
4- import { isMaterial } from '../../../helpers/themeUtils' ;
54
6- fixture `TreeList - Aria Label` . page ( url ( __dirname , '../../container.html' ) ) ;
5+ fixture `TreeList - Aria Label`
6+ . page ( url ( __dirname , '../../container.html' ) ) ;
77
88const tasks = [
99 {
@@ -74,7 +74,7 @@ const options = {
7474 ] ,
7575} ;
7676
77- test . meta ( { unstable : ! ! isMaterial ( ) } ) ( 'Aria expanded should be toggled true on Ctrl + → keypress' , async ( t ) => {
77+ test ( 'Aria expanded should be toggled true on Ctrl + → keypress' , async ( t ) => {
7878 const treeList = new TreeList ( '#container' ) ;
7979 const expandableRow = treeList . getDataRow ( 0 ) . element ;
8080 const expandableCells = [
@@ -85,11 +85,9 @@ test.meta({ unstable: !!isMaterial() })('Aria expanded should be toggled true on
8585
8686 await t
8787 . expect ( treeList . getContainer ( ) . getAttribute ( 'aria-label' ) )
88- . eql ( isMaterial ( )
89- ? 'Tree list with 3 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it'
90- : 'Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it' )
88+ . eql ( 'Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it' )
9189 . expect ( expandableRow . getAttribute ( 'aria-expanded' ) )
92- . eql ( isMaterial ( ) ? 'true' : 'false' ) ;
90+ . eql ( 'false' ) ;
9391
9492 // eslint-disable-next-line no-restricted-syntax
9593 for ( const cell of expandableCells ) {
@@ -106,7 +104,10 @@ test.meta({ unstable: !!isMaterial() })('Aria expanded should be toggled true on
106104 for ( const cell of expandableCells ) {
107105 await t . expect ( cell . getAttribute ( 'aria-expanded' ) ) . eql ( 'true' ) ;
108106 }
109- } ) . before ( async ( ) => createWidget ( 'dxTreeList' , options ) ) ;
107+ } ) . before ( async ( ) => createWidget ( 'dxTreeList' , {
108+ ...options ,
109+ expandedRowKeys : [ 0 ] ,
110+ } ) ) ;
110111
111112test ( 'Aria expanded should be toggled false on Ctrl + ← keypress' , async ( t ) => {
112113 const treeList = new TreeList ( '#container' ) ;
@@ -138,7 +139,7 @@ test('Aria expanded should be toggled false on Ctrl + ← keypress', async (t) =
138139 for ( const cell of expandableCells ) {
139140 await t . expect ( cell . getAttribute ( 'aria-expanded' ) ) . eql ( 'false' ) ;
140141 }
141- } ) . before ( async ( ) => {
142- options . expandedRowKeys = [ 1 ] ;
143- await createWidget ( 'dxTreeList' , options ) ;
144- } ) ;
142+ } ) . before ( async ( ) => createWidget ( 'dxTreeList' , {
143+ ... options ,
144+ expandedRowKeys : [ 1 ] ,
145+ } ) ) ;
0 commit comments