export const testInputStatus = ( field , error ? ) : void => { cy . getByTestId ( `${ field }-wrap` ) . should ( 'have.attr' , 'data-status' , error ? 'invalid' : 'valid' ) ; const attr = `${ error ? '' : 'not.' }have.attr` ; cy . getByTestId ( field ) . should ( attr , 'title' , error ) ; cy . getByTestId ( `${ field }-label` ) . should ( attr , 'title' , error ) ; } ; export const testMainError = ( error ) : void => { cy . getByTestId ( 'spinner' ) . should ( 'not.exist' ) ; cy . getByTestId ( 'main-error' ) . should ( 'contain.text' , error ) ; } ;