Created
November 11, 2019 16:16
-
-
Save hernanif1/cc3b36c21b43c8106ca02bac2dc1cfaf to your computer and use it in GitHub Desktop.
This file contains 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
// run command | |
npm install cypress --save-dev | |
// add in your scripts package.json | |
"cy:dev": "cypress open", | |
// run this command to create cypress folder and cypress.json | |
run run cy:dev | |
// create a file in cypress/integration/login.js and add: | |
it("Load page", () => { | |
cy.get('[data-testid=loginForm]') | |
}) | |
// add this attribute in your Login.tsx | |
data-testid="loginForm" | |
// configurate your cypress.json | |
{ | |
"baseUrl": "http://localhost:3000", | |
"chromeWebSecurity": false, | |
"projectId": "myid", | |
} | |
// create another tests :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment