diff --git a/cypress/e2e/user.cy.js b/cypress/e2e/user.cy.js index 322992c..6961ba5 100644 --- a/cypress/e2e/user.cy.js +++ b/cypress/e2e/user.cy.js @@ -1,5 +1,11 @@ -describe('template spec', () => { - it('passes', () => { - cy.visit('https://example.cypress.io') - }) -}) \ No newline at end of file +describe('user login', () => { + it('logs in', () => { + cy.exec('npm run db:seed') + cy.visit('/') + cy.get('a').click() + cy.url().should('include', '/login') + cy.get('input[name=email]').type('test@test.com') + cy.get('input[name=password]').type('password{enter}') + cy.url().should('include', '/dashboard') + }) +})