test: initialize e2e testing framework based on cypress#95
test: initialize e2e testing framework based on cypress#95stefcameron merged 3 commits intofocus-trap:masterfrom
Conversation
💥 No ChangesetLatest commit: 3e0cece Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
liunate
left a comment
There was a problem hiding this comment.
@stefcameron This PR is in response to the discussion #87 comment
As #87 only updates the prop type, I am not so sure if we should add test case for that simple change. Instead I think we can start the e2e test from current demo page as it proves the react wrapper works perfectly.
I also imagine there could be more demos in this repo, or maybe exactly same ones as focus-trap being wrapped. So e2e tests give confidence that our react wrapper does not screw things up at each focus-trap features.
| container: cypress/included:5.0.0 | ||
| strategy: | ||
| matrix: | ||
| browser: [chrome] # cypress executable says 'Browser: 'firefox' was not found on your system or is not supported by Cypress.' seems to be defect |
There was a problem hiding this comment.
firefox will be added if the unsupported problem at the image is solved.
|
@liunate This is exciting! Thanks for doing this. 🎉 I will try to have a look over the next few days as time permits. |
| "release": "yarn build && changeset publish", | ||
| "test-types": "tsc index.d.ts", | ||
| "test-unit": "jest", | ||
| "test-cypress": "start-server-and-test start 9966 'cypress open'", |
There was a problem hiding this comment.
Developer can run e2e locally with cypress interactive UI.
| "@babel/preset-react": "^7.10.1", | ||
| "@changesets/cli": "^2.9.1", | ||
| "@testing-library/cypress": "^6.0.1", | ||
| "@types/jquery": "^3.5.1", |
There was a problem hiding this comment.
Fix the missing jquery type info error while using @testing-library/cypress
stefcameron
left a comment
There was a problem hiding this comment.
Nice work! I'm excited we have this type of test now, thank you! 🎉
Were you able to track this down to a bug in the image? If so, I'm thinking we should open an issue to track adding FireFox as a browser to test on our end here once the image is fixed. |
That sounds a good idea. Maybe edge could be also part of the TODO items in that issue as these three(Chrome, Firefox and Edge) are the three major players in the market. p.s. Safari could be counted one major but unfortunately cypress does not support it at this moment If you see this is okay, then I can create the issue along with the open issue I submitted to cypress for tracking purpose 💪 |
Fantastic, please do! 🎉 |
FYI issue created for tracking #104 |
What does this PR do
There are already some unit tests using jest which defaults its testing environment on
jsdom. Howeverjsdomcould have some focus issues(or other glitches) that does not always work consistently with real browsers such as chrome and firefox.TODOs