import { Given , When } from 'cypress-cucumber-preprocessor/steps' ; import { User } from '../../common/helpers' ; import { Environment } from '../../common/types' ; import UdLoginPage from '../pages/ud-login-page' ; let udLoginPage ; Given ( "je navigue sur la page d'accueil du dashboard usager" , function ( ) { const { udRootUrl } = this . env ; todo author cy . visit ( udRootUrl ) ; udLoginPage = new UdLoginPage ( udRootUrl ) ; udLoginPage . checkIsVisible ( ) ; } ) ; When ( 'je me connecte au dashboard usager' , function ( ) { const user = this . user ; const credentials = user . getCredentials ( 'fip1' ) ; udLoginPage . login ( credentials ) ; } ) ;