-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests #53
Comments
Nice, I was just thinking about this. I feel like since we have so many edge cases with site support (even with only GitHub and Stack Overflow for now), end to end tests with Cypress could be really useful for regression testing. Also we won't need to restructure code for end to end tests, assuming there's a way to install extensions. It still may be useful to have some unit and integration tests though. |
Agreed this would be good to do, although I'm not sure how easy it would be to achieve with Cypress as there are some pretty specific edge cases that I don't know how you could simulate. (At least without just using static web pages) i.e: Creator of an issue see's a special button when commenting, Owner/Maintainer of a project see's special buttons when commenting on PRs (same with issues) ..etc I think it would also be good to have some unit tests too though. |
It's possible to install a Chrome extension in Cypress, but we may still need to mock the |
I've tried Cypress and Puppeteer, but they don't seem to support what we need to fully test the extension. Selenium works, but we'd have to authenticate a GitHub account in the tests as the extension only works logged in. I think integration/unit testing would be a better approach, I'm making progress with Jest. |
Anyone should be able to start setting up some Jest tests based on #81, but I still have a few in-progress tests that I need to figure out. Please let me know if there's anything you plan on testing so we can coordinate, and only mock/stub what's needed for test environment support so we can keep tests as realistic as possible. Here are my test plan ideas so far (some of which I've already started implementing):
|
Once the basic functionality has been sorted out, we should split the code into smaller modules and add some tests.
The text was updated successfully, but these errors were encountered: