This closes #29, adds cypress for e2e tests.#43
Open
josenaranjo wants to merge 2 commits into
Open
Conversation
| The following command opens the cypress console from which you can run the tests. | ||
|
|
||
| ``` | ||
| npx cypress open |
Member
There was a problem hiding this comment.
Hello @josenaranjo, thanks for working on this!
It would be nice to have an npm script that does this. I can think of something like test:e2e or just e2e.
| const displayBoxes = ({ numberBoxes, width, height }) => | ||
| Array.from({ length: numberBoxes }, (_, i) => | ||
| <Box primary={i % 2 === 0} width={width} height={height} key={i}/>); | ||
| <Box data-e2e={`box-${i}`} primary={i % 2 === 0} width={width} height={height} key={i}/>); |
alejandronanez
approved these changes
Oct 28, 2018
| "predeploy": "yarn build", | ||
| "deploy": "gh-pages -d build", | ||
| "test": "react-scripts test --env=jsdom", | ||
| "test:e2e": "npx cypress open", |
Member
There was a problem hiding this comment.
You can just do cypress open
Author
There was a problem hiding this comment.
I tried it command not found: cypress. I think it depends if you installed globally or not.
| "predeploy": "yarn build", | ||
| "deploy": "gh-pages -d build", | ||
| "test": "react-scripts test --env=jsdom", | ||
| "test:e2e": "npx cypress open", |
Member
There was a problem hiding this comment.
Suggested change
| "test:e2e": "npx cypress open", | |
| "test:e2e": "cypress open", |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Adds cypress as the e2e tests framework.
What is the current behavior?
Issue Number: 29
What is the new behavior?
You can open cypress console running
npx cypress openin your terminal.Does this PR introduce a breaking change?
Other information