export const Fari = { startLeaveCookie ( ) { cy . visit ( "/" ) ; } , start ( ) { cy . visit ( "/" ) ; this . get ( "cookie-consent" ) . click ( { force : true } ) ; } , param url visit ( url ) { cy . visit ( url ) ; } , get ( tag ) { return cy . get ( `[data-cy='${ tag }']` ) ; } , getByText ( text ) { return cy . contains ( text ) ; } , find ( element , tag ) { return element . find ( `[data-cy='${ tag }']` ) ; } , getAttribute ( element , attr ) { return element . invoke ( "attr" , attr ) ; } , waitContentEditable ( ) { const contentEditableDelay = 750 ; cy . wait ( contentEditableDelay + 100 ) ; } , closeBackdrop ( ) { cy . get ( ".MuiPopover-root" ) . eq ( 0 ) . click ( ) ; } , closeDrawer ( ) { cy . get ( ".MuiBackdrop-root" ) . eq ( 0 ) . click ( { force : true } ) ; } , toggleDarkMode ( ) { Fari . get ( "page.toggle-dark-mode" ) . click ( ) ; } , changeLanguage ( language ) { Fari . get ( "page.menu.languages" ) . click ( ) ; Fari . get ( "app.languages" ) . select ( language ) ; } , } ;