Skip to content

Conversation

@josenaranjo
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[x] Other... Please describe:

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 open in your terminal.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

README.md Outdated
The following command opens the cypress console from which you can run the tests.

```
npx cypress open
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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}/>);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

"predeploy": "yarn build",
"deploy": "gh-pages -d build",
"test": "react-scripts test --env=jsdom",
"test:e2e": "npx cypress open",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just do cypress open

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"test:e2e": "npx cypress open",
"test:e2e": "cypress open",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants