@@ -61,13 +61,15 @@ describe("Testing the Gmail Demo", () => {
6161
6262 // On a folder that is closed
6363 cy . get ( "@item" ) . contains ( "Categories" ) . click ( ) ; // closed it
64+ cy . focused ( ) . should ( "have.attr" , "aria-expanded" , "false" ) ;
6465 cy . focused ( ) . type ( "a" ) ;
6566 cy . focused ( ) . type ( "Root{enter}" ) ;
6667 cy . get ( "@item" ) . contains ( "Root" ) . click ( ) ;
6768 cy . focused ( ) . should ( "have.attr" , "aria-level" , "1" ) ;
6869
6970 // On a folder that is open
7071 cy . get ( "@item" ) . contains ( "Categories" ) . click ( ) ; // opened it
72+ cy . focused ( ) . should ( "have.attr" , "aria-expanded" , "true" ) ;
7173 cy . focused ( ) . type ( "a" ) ;
7274 cy . focused ( ) . type ( "Child{enter}" ) ;
7375 cy . get ( "@item" ) . contains ( "Child" ) . click ( ) ;
@@ -91,6 +93,7 @@ describe("Testing the Gmail Demo", () => {
9193
9294 // On a folder that is closed
9395 cy . get ( "@item" ) . contains ( "Categories" ) . click ( ) ; // closed it
96+ cy . focused ( ) . should ( "have.attr" , "aria-expanded" , "false" ) ;
9497 cy . focused ( ) . type ( "A" ) ;
9598 cy . focused ( ) . type ( "Root{enter}" ) ;
9699 cy . get ( "@item" ) . contains ( "Root" ) . click ( ) ;
@@ -99,6 +102,7 @@ describe("Testing the Gmail Demo", () => {
99102
100103 // On a folder that is open
101104 cy . get ( "@item" ) . contains ( "Categories" ) . click ( ) ; // opened it
105+ cy . focused ( ) . should ( "have.attr" , "aria-expanded" , "true" ) ;
102106 cy . focused ( ) . type ( "A" ) ;
103107 cy . focused ( ) . type ( "Child{enter}" ) ;
104108 cy . get ( "@item" ) . contains ( "Child" ) . click ( ) ;
0 commit comments