Created
October 26, 2017 16:20
-
-
Save samtgarson/dadd2d760c7701c8ab0c2ee8e89bd9a4 to your computer and use it in GitHub Desktop.
Cypress Run Bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Book Room', () => { | |
before(() => { | |
cy.server() | |
}) | |
it('creates a Booking', () => { | |
cy.visit('/results?number_of_adults=2&number_of_children=0&from=2017-10-28&to=2017-10-30') | |
cy.get('.rooms .room:first').click() | |
cy.get('#book').click() | |
cy.get('#confirmBooking').click() | |
cy.wait('@createBooking') | |
cy.get('h1').should('have.text', '33340') | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ y cypress run | |
yarn run v1.2.1 | |
$ /Users/sam.garson/Projects/soho_house/platform-mvp/node_modules/.bin/cypress run | |
(Tests Starting) | |
Book Room | |
1) creates a Booking | |
View Home Page | |
2) "before all" hook for "renders the search form" | |
0 passing (2s) | |
2 failing | |
1) Book Room creates a Booking: | |
Uncaught SyntaxError: Unexpected identifier | |
2) View Home Page "before all" hook for "renders the search form": | |
Uncaught SyntaxError: Unexpected identifier | |
Because this error occurred during a 'before all' hook we are skipping the remaining tests in the current suite: 'View Home Page' | |
(Tests Finished) | |
- Tests: 1 | |
- Passes: 0 | |
- Failures: 2 | |
- Pending: 0 | |
- Duration: 1 second | |
- Screenshots: 0 | |
- Video Recorded: false | |
- Cypress Version: 0.20.1 | |
(All Done) | |
error Command failed with exit code 2. | |
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('View Home Page', () => { | |
before(() => { | |
cy.visit('/') | |
cy.server() | |
}) | |
it('renders the search form', () => { | |
cy.get('.search') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proof of tests passing with
cypress open
: