@@ -133,7 +133,7 @@ describe('Users', () => {
133133 // Click detail button.
134134 cy . get ( '#action-root' ) . click ( ) ;
135135
136- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #detail-root' ) . click ( ) ;
136+ cy . get ( '#detail-root' ) . click ( ) ;
137137
138138 // Display user lucy details.
139139 cy . get ( '.MuiDrawer-root > .MuiPaper-root' ) . should ( 'be.visible' ) ;
@@ -167,7 +167,7 @@ describe('Users', () => {
167167 } ,
168168 ) ;
169169
170- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #detail-jack' ) . click ( ) ;
170+ cy . get ( '#detail-jack' ) . click ( ) ;
171171
172172 cy . get ( '[data-testid="detail-isloading"]' ) . should ( 'be.exist' ) ;
173173
@@ -188,15 +188,15 @@ describe('Users', () => {
188188 it ( 'can display update user' , ( ) => {
189189 // Click update user button.
190190 cy . get ( '#action-lucy' ) . click ( ) ;
191- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
191+ cy . get ( '#edit-lucy' ) . click ( ) ;
192192
193193 // Check role.
194194 cy . get ( '#role-root' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
195195 cy . get ( '#role-guest' ) ;
196196 cy . get ( 'body' ) . click ( 'topLeft' ) ;
197197
198198 cy . get ( '#action-jack' ) . click ( ) ;
199- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-jack' ) . click ( ) ;
199+ cy . get ( '#edit-jack' ) . click ( ) ;
200200
201201 cy . get ( '#role-root' ) . should ( 'not.be.checked' ) ;
202202 cy . get ( '#role-guest' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
@@ -301,7 +301,7 @@ describe('Users', () => {
301301 ) ;
302302
303303 cy . get ( '#action-jack' ) . click ( ) ;
304- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #detail-jack' ) . click ( ) ;
304+ cy . get ( '#detail-jack' ) . click ( ) ;
305305
306306 // Display user jack details.
307307 cy . get ( '#id' ) . should ( 'have.text' , 0 ) ;
@@ -431,7 +431,7 @@ describe('Users', () => {
431431 ) ;
432432
433433 cy . get ( '#action-lucy' ) . click ( ) ;
434- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
434+ cy . get ( '#edit-lucy' ) . click ( ) ;
435435
436436 cy . get ( '#role-root' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
437437 cy . get ( '#role-guest' ) . should ( 'not.be.checked' ) ;
@@ -455,7 +455,7 @@ describe('Users', () => {
455455 ) ;
456456
457457 cy . get ( '#action-lucy' ) . click ( ) ;
458- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
458+ cy . get ( '#edit-lucy' ) . click ( ) ;
459459
460460 // Change success message.
461461 cy . get ( '.MuiAlert-message' ) . should ( 'be.visible' ) . and ( 'have.text' , 'Submission successful!' ) ;
@@ -504,7 +504,7 @@ describe('Users', () => {
504504 ) ;
505505
506506 cy . get ( '#action-jack' ) . click ( ) ;
507- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-jack' ) . click ( ) ;
507+ cy . get ( '#edit-jack' ) . click ( ) ;
508508
509509 // Check if role is guest.
510510 cy . get ( '#role-root' ) . should ( 'not.be.checked' ) ;
@@ -529,7 +529,7 @@ describe('Users', () => {
529529 ) ;
530530
531531 cy . get ( '#action-jack' ) . click ( ) ;
532- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-jack' ) . click ( ) ;
532+ cy . get ( '#edit-jack' ) . click ( ) ;
533533
534534 // Check if role is root.
535535 cy . get ( '#role-root' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
@@ -591,7 +591,7 @@ describe('Users', () => {
591591
592592 // Click edit button.
593593 cy . get ( '#action-lucy' ) . click ( ) ;
594- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
594+ cy . get ( '#edit-lucy' ) . click ( ) ;
595595
596596 cy . get ( '#role-root' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
597597 cy . get ( '#role-guest' ) . should ( 'not.be.checked' ) ;
@@ -617,7 +617,7 @@ describe('Users', () => {
617617 ) ;
618618
619619 cy . get ( '#action-lucy' ) . click ( ) ;
620- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
620+ cy . get ( '#edit-lucy' ) . click ( ) ;
621621
622622 // Check role.
623623 cy . get ( '#role-root' ) . should ( 'not.be.checked' ) ;
@@ -659,7 +659,7 @@ describe('Users', () => {
659659 ) ;
660660
661661 cy . get ( '#action-lucy' ) . click ( ) ;
662- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
662+ cy . get ( '#edit-lucy' ) . click ( ) ;
663663
664664 // Show error message.
665665 cy . get ( '.MuiAlert-message' ) . should ( 'be.visible' ) . and ( 'have.text' , 'Failed to fetch' ) ;
@@ -706,7 +706,7 @@ describe('Users', () => {
706706 ) ;
707707
708708 cy . get ( '#action-lucy' ) . click ( ) ;
709- cy . get ( ':nth-child(12) > .MuiPaper-root > .MuiList-root > .users_menu__4L0WC > #edit-lucy' ) . click ( ) ;
709+ cy . get ( '#edit-lucy' ) . click ( ) ;
710710
711711 // Check if role is root.
712712 cy . get ( '#role-root' ) . should ( 'be.checked' ) . check ( { force : true } ) ;
0 commit comments