-
Notifications
You must be signed in to change notification settings - Fork 131
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
Integrates jest-puppeteer for UI testing #541
Conversation
It doesn't work without adding args: ['--no-sandbox'] in the config file. (Found this as a solution for the errors) . The only relevant piece of info I've found so far is |
The jest test can be run using
|
This is looking awesome. Can you include your docs (as written above) in the README as a part of this PR? This is really cool! Just noting we can potentially merge this PR without making the UI tests required, in order to allow people to try it out and to refine it a bit. Then we can open a follow-up issue to "turn it on" for Travis and make them required. But, we don't have to do it this way, it's just an option to consider! Thanks @shreyaa-sharmaa this is going to be EPICALLY useful for any new features we add, as every PR can begin to have thorough UI tests. Please consider including it in either the next release in #532 or in an upcoming release! 🎉 🙌 |
@Shulammite-Aso @keshav234156 @NitinBhasneria this is really cool! Give it a try? And one more thought - if you need special configurations to run this, perhaps adding lines to our Travis configuration to ensure it will run in /that/ environment, will help to demonstrate the prerequisites needed to run it, all in the same PR? Here's an example complex travis.yml with prerequisites: https://github.com/publiclab/image-sequencer/blob/main/.travis.yml And here are some docs! https://docs.travis-ci.com/user/installing-dependencies/ Great work! 💯 |
Thanks for the input @jywarren . I completely agree with the idea of not making the UI tests required as of right now. The only reason I opened it as a draft PR was because I was writing a few tests and wanted to make sure that the config file meets all the requirements before I open the PR. Since we faced a few bugs with the formatting options like bolding the text, and have been working on implementing the new features, I too believe that this would be a great asset for thorough UI testing and would love to see it in the next release. I'll go through the docs that you shared and get back here as soon as possible. Also I'll try to add in a few tests asap. I'm working on them right now. |
Hi @shreyaa-sharmaa can you link us to where the tests are being run in Travis, if they are yet? Or if not, can you paste in here (or quote from gist.github.com) a sample test log? Thanks!! |
Please add the test command in travis.yml,so that it on run on Travis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
Wow, this is fantastic! Have you tested introducing a test error to be sure Travis fails too? Just this last test -- we should see a little red X appear -- and then let's fix it again and merge this! |
Actually, because I know other PRs are waiting on this, would you mind @shreyaa-sharmaa creating a PR that breaks tests, just to confirm, and linking here? Then I can merge this to unblock others. FANTASTIC WORK! This is going to be huge for complex features we need to protect, and for debugging delicate things like jywarren/woofmark#4 (comment) THANKS!! 🎉 🎉 |
Congrats on merging your first pull request! 🙌🎉⚡️ Help others take their first stepNow that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌 Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕 People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉 Read about how to help support another newcomer here, or find other ways to offer mutual support here. |
@@ -320,14 +320,26 @@ For additional support, join the Public Lab website and mailing list at http://p | |||
|
|||
## Testing | |||
|
|||
Automated tests are an essential way to ensure that new changes don't break existing functionality, and can help you be confident that your code is ready to be merged in. We use Jasmine for testing: https://jasmine.github.io/2.4/introduction.html | |||
Automated tests are an essential way to ensure that new changes don't break existing functionality, and can help you be confident that your code is ready to be merged in. We use Jasmine for testing: https://jasmine.github.io/2.4/introduction.html. The UI tests are written using jest and puppeteer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU for this excellent documentation!
Ah, actually look - it failed here after updating!! #543 so we should be all good! ✅ 🎉 🙌 |
Fixes #503
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt jasmine
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!