diff --git a/cypress/e2e/carriers.cy.js b/cypress/e2e/carriers.cy.js new file mode 100644 index 0000000..f28543a --- /dev/null +++ b/cypress/e2e/carriers.cy.js @@ -0,0 +1,15 @@ +describe('freight carriers', () => { + beforeEach(() => { + cy.exec('npm run db:seed') + }) + it('creates freight carrier', () => { + cy.visit('/freight_carriers') + cy.get('input[name=company]').type('test company') + cy.get('input[name=contact_person]').type('Joe Shmoe') + cy.get('input[name=email]').type('joe@shmoe.com') + cy.get('input[name=phone_number]').type('123456789') + cy.get('input[name=notes]').type('some notes{enter}') + cy.url().should('include', '/freight_carriers') + cy.get('table').contains('test company') + }) +})