navigation_from_home_page_to_login_page.js 1.1KB

1234567891011121314151617181920212223
  1. describe('login :: navigate > disconnect', function () {
  2. before(function () {
  3. cy.visit('/login')
  4. })
  5. it('loging to home_page', function () {
  6. // type username
  7. cy.get('input[type=email]').type('admin@admin.admin').should('have.value','admin@admin.admin')
  8. // type password
  9. cy.get('input[type=password]').type('admin@admin.admin').should('have.value','admin@admin.admin')
  10. // click on button "connexion" also if name of button change
  11. cy.get('form').find('button').get('.connection__form__btnsubmit').click()
  12. // we should be redirected to /dashboard
  13. cy.url().should('include', 'http://localhost:6543/')
  14. cy.get('.profilgroup__name__imgprofil').should('have.attr','src')
  15. // for the moment we don't have name by default (26/07/2018)
  16. cy.get('.profilgroup__name__imgprofil').invoke('text').should('be.equal','')
  17. })
  18. it('logout from home_page', function() {
  19. cy.get('#dropdownMenuButton').click()
  20. cy.get('div.setting__link').click()
  21. cy.url().should('include', '/login')
  22. })
  23. })