

describe('RegisterTest', function() {
    before(function(){
        
         cy.exec('yarn dropAndCreateDB',{failOnNonZeroExit: false});
    })
    it('Test if Register works', function() {
       cy.viewport(375, 667)
       cy.visit('/')
       cy.get('.cypConnexionMenu').click()
       cy.get('.cypRegister').click({ force: true })
       cy.url().should('contain', 'Login')
       cy.get('#nom').type(Cypress.env('nom'))
       cy.get('#prenom').type(Cypress.env('prenom'))
       cy.get('#emailRegister').type(Cypress.env('email'))
       cy.get('#adornment-password').type(Cypress.env('password'))
       cy.get('#cypCheckboxRegister').check()
       cy.get('.cypButtonRegister').click().wait(3000)
       cy.url().should('contain','VerifyEmail')
       cy.get('span').should('contain',Cypress.env('email'))
    })
})



    
       
