@@ -111,7 +111,7 @@ describe('Cash transfer program update workflows', () => {
111111
112112 cy . enterMuiInput ( 'Description' , updatedDescription , 'textarea' )
113113
114- cy . get ( '[title ="Save changes"] button' ) . click ( )
114+ cy . get ( '[aria-label ="Save changes"] button' ) . click ( )
115115
116116 cy . checkProgramUpdateCompleted ( )
117117
@@ -220,7 +220,7 @@ describe('Cash transfer program update workflows', () => {
220220
221221 cy . contains ( 'h2' , 'Assign Active Beneficiaries' )
222222 cy . contains ( 'h6' , '0 active beneficiaries selected' )
223- cy . get ( '[role="dialog"] [title ="Previous Page"]' )
223+ cy . get ( '[role="dialog"] [aria-label ="Previous Page"]' )
224224 . next ( 'span' )
225225 . invoke ( 'text' )
226226 . then ( ( text ) => {
@@ -232,13 +232,13 @@ describe('Cash transfer program update workflows', () => {
232232 // filter beneficiaries by number of children
233233 cy . contains ( '[role="dialog"] button' , '=' ) . trigger ( 'mouseover' ) ;
234234 cy . contains ( 'li' , '<' ) . click ( ) ;
235- cy . get ( '[role="dialog"] input[type="number"]' ) . clear ( ) . type ( '5' ) ;
235+ cy . get ( '[role="dialog"] input[type="number"]' ) . first ( ) . clear ( { force : true } ) . type ( '5' , { force : true } ) ;
236236
237237 cy . get ( '[role="progressbar"]' ) . should ( 'exist' )
238238 cy . get ( '[role="progressbar"]' ) . should ( 'not.exist' )
239239
240240 cy . get ( '@numCandidates' ) . then ( ( prevTotal ) => {
241- cy . get ( '[role="dialog"] [title ="Previous Page"]' )
241+ cy . get ( '[role="dialog"] [aria-label ="Previous Page"]' )
242242 . next ( 'span' )
243243 . invoke ( 'text' )
244244 . then ( ( text ) => {
@@ -249,7 +249,7 @@ describe('Cash transfer program update workflows', () => {
249249 } ) ;
250250
251251 // assign all matching beneficiaries from the first page
252- cy . get ( 'th input[type="checkbox"]' ) . check ( )
252+ cy . get ( '[role="dialog"] th input[type="checkbox"]' ) . first ( ) . check ( { force : true } )
253253 cy . contains ( 'h6' , '0 active beneficiaries selected' ) . should ( 'not.exist' )
254254 cy . get ( '[role="dialog"] h6' )
255255 . invoke ( 'text' )
@@ -287,7 +287,7 @@ describe('Cash transfer program update workflows', () => {
287287 . type ( 'Ter' )
288288 cy . wait ( 500 ) // give the filter results to settle down
289289 cy . get ( '@assignedProjectBeneficiaries' ) . then ( ( assignedProjectBeneficiaries ) => {
290- cy . get ( '[title ="Previous Page"]' )
290+ cy . get ( '[aria-label ="Previous Page"]' )
291291 . next ( 'span' )
292292 . invoke ( 'text' )
293293 . then ( ( text ) => {
@@ -320,11 +320,11 @@ describe('Cash transfer program update workflows', () => {
320320 const workingDaysUpdated = "10"
321321 cy . enterMuiInput ( 'Working Days' , workingDaysUpdated )
322322
323- cy . get ( '[title ="Save"] button' ) . click ( )
323+ cy . get ( '[aria-label ="Save"] button' ) . click ( )
324324
325325 // Wait for update to complete
326- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'exist' )
327- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'not.exist' )
326+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'exist' )
327+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'not.exist' )
328328
329329 // Check last journal message
330330 cy . get ( 'ul.MuiList-root li' ) . first ( ) . click ( )
@@ -356,7 +356,7 @@ describe('Cash transfer program update workflows', () => {
356356
357357 cy . contains ( 'td' , name )
358358 . parent ( 'tr' ) . within ( ( ) => {
359- cy . get ( 'button[title ="Edit"]' ) . click ( { force : true } ) ;
359+ cy . get ( 'button[aria-label ="Edit"]' ) . click ( { force : true } ) ;
360360 } )
361361
362362 cy . assertMuiInputDisabled ( 'Name' , name )
@@ -367,12 +367,12 @@ describe('Cash transfer program update workflows', () => {
367367 cy . assertMuiInputDisabled ( 'Status' )
368368 cy . assertMuiInputDisabled ( 'Program' )
369369
370- cy . get ( 'button[title ="Undo Delete"]' ) . click ( )
370+ cy . get ( 'button[aria-label ="Undo Delete"]' ) . click ( )
371371 cy . contains ( 'button' , 'Ok' ) . click ( ) ;
372372
373373 // Wait for undo to complete
374- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'exist' )
375- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'not.exist' )
374+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'exist' )
375+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'not.exist' )
376376
377377 // Check last journal message
378378 cy . get ( 'ul.MuiList-root li' ) . first ( ) . click ( )
@@ -427,7 +427,7 @@ describe('Cash transfer program update workflows', () => {
427427
428428 cy . enterMuiInput ( 'Description' , updatedDescription , 'textarea' )
429429
430- cy . get ( '[title ="Save changes"] button' ) . click ( )
430+ cy . get ( '[aria-label ="Save changes"] button' ) . click ( )
431431
432432 cy . checkProgramUpdateCompleted ( )
433433
@@ -557,7 +557,9 @@ describe('Cash transfer program update workflows', () => {
557557
558558 cy . contains ( 'h2' , 'Assign Active Beneficiaries' )
559559 cy . contains ( 'h6' , '0 active beneficiaries selected' )
560- cy . get ( '[role="dialog"] [title="Previous Page"]' )
560+
561+ // Verify there are candidates to assign
562+ cy . get ( '[role="dialog"] [aria-label="Previous Page"]' )
561563 . next ( 'span' )
562564 . invoke ( 'text' )
563565 . then ( ( text ) => {
@@ -644,11 +646,11 @@ describe('Cash transfer program update workflows', () => {
644646 const workingDaysUpdated = "10"
645647 cy . enterMuiInput ( 'Working Days' , workingDaysUpdated )
646648
647- cy . get ( '[title ="Save"] button' ) . click ( )
649+ cy . get ( '[aria-label ="Save"] button' ) . click ( )
648650
649651 // Wait for update to complete
650- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'exist' )
651- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'not.exist' )
652+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'exist' )
653+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'not.exist' )
652654
653655 // Check last journal message
654656 cy . get ( 'ul.MuiList-root li' ) . first ( ) . click ( )
@@ -680,7 +682,7 @@ describe('Cash transfer program update workflows', () => {
680682
681683 cy . contains ( 'td' , name )
682684 . parent ( 'tr' ) . within ( ( ) => {
683- cy . get ( 'button[title ="Edit"]' ) . click ( { force : true } ) ;
685+ cy . get ( 'button[aria-label ="Edit"]' ) . click ( { force : true } ) ;
684686 } )
685687
686688 cy . assertMuiInputDisabled ( 'Name' , name )
@@ -691,12 +693,12 @@ describe('Cash transfer program update workflows', () => {
691693 cy . assertMuiInputDisabled ( 'Status' )
692694 cy . assertMuiInputDisabled ( 'Program' )
693695
694- cy . get ( 'button[title ="Undo Delete"]' ) . click ( )
696+ cy . get ( 'button[aria-label ="Undo Delete"]' ) . click ( )
695697 cy . contains ( 'button' , 'Ok' ) . click ( ) ;
696698
697699 // Wait for undo to complete
698- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'exist' )
699- cy . get ( 'ul.MuiList-root li div [role="progressbar"]' ) . should ( 'not.exist' )
700+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'exist' )
701+ cy . get ( 'ul.MuiList-root li [role="progressbar"]' ) . should ( 'not.exist' )
700702
701703 // Check last journal message
702704 cy . get ( 'ul.MuiList-root li' ) . first ( ) . click ( )
0 commit comments