@@ -283,28 +283,28 @@ describe('Page', function() {
283283 it ( 'Allows to toggle persistent full-width view' , function ( ) {
284284 cy . visit ( '/apps/collectives/Our%20Garden/Day%202' )
285285 cy . get ( '#titleform' ) . should ( 'have.css' , 'max-width' , '100%' )
286- cy . get ( '[data-collectives-el="reader"], #read-only-editor' ) . invoke ( 'outerWidth' ) . should ( 'eq' , 670 )
286+ cy . getReadOnlyEditor ( ) . invoke ( 'outerWidth' ) . should ( 'eq' , 670 )
287287
288288 // Set full width mode
289289 cy . get ( '#titleform .action-item__menutoggle' )
290290 . click ( )
291291 cy . contains ( 'li.action' , 'Full width' )
292292 . click ( )
293293 cy . get ( '#titleform' ) . should ( 'have.css' , 'max-width' , 'none' )
294- cy . get ( '[data-collectives-el="reader"], #read-only-editor' ) . invoke ( 'outerWidth' ) . should ( 'be.greaterThan' , 700 )
294+ cy . getReadOnlyEditor ( ) . invoke ( 'outerWidth' ) . should ( 'be.greaterThan' , 700 )
295295
296296 // Reload to check persistence with browser storage
297297 cy . reload ( )
298298 cy . get ( '#titleform' ) . should ( 'have.css' , 'max-width' , 'none' )
299- cy . get ( '[data-collectives-el="reader"], #read-only-editor' ) . invoke ( 'outerWidth' ) . should ( 'be.greaterThan' , 700 )
299+ cy . getReadOnlyEditor ( ) . invoke ( 'outerWidth' ) . should ( 'be.greaterThan' , 700 )
300300
301301 // Unset full width mode
302302 cy . get ( '#titleform .action-item__menutoggle' )
303303 . click ( )
304304 cy . contains ( 'li.action' , 'Full width' )
305305 . click ( )
306306 cy . get ( '#titleform' ) . should ( 'have.css' , 'max-width' , '100%' )
307- cy . get ( '[data-collectives-el="reader"], #read-only-editor' ) . invoke ( 'outerWidth' ) . should ( 'eq' , 670 )
307+ cy . getReadOnlyEditor ( ) . invoke ( 'outerWidth' ) . should ( 'eq' , 670 )
308308 } )
309309 } )
310310
0 commit comments