-
-
Notifications
You must be signed in to change notification settings - Fork 276
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 End 2 End tests #477
Add End 2 End tests #477
Conversation
5563f63
to
d8069d5
Compare
d8069d5
to
3b4909a
Compare
a24b44f
to
16e99ea
Compare
ec9ca26
to
e30c96c
Compare
e30c96c
to
0c8dd8d
Compare
module.exports = { | ||
launch: { | ||
dumpio: true, | ||
headless: false, |
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.
Puppeteer headless doesn't support extensions, right now.
Hi @josephfrazier 👋 Friendly reminder in case you missed my review request. I'm excited to hear feedback on this |
Thanks for the reminder, I had forgotten about this one. This looks really good overall! I'm excited to see proper Chrome tests, and I've been looking for a reason to get familiar with I do have one question though: Why put the e2e tests in a separate repo? It seems like that makes it harder to keep track of them, versus just keeping them here. |
No worries, happens to me all the time 😉 Puppeteer is really amazing and defiantly something you should look into. But back to topic: That's a good question. Initially I thought it would be good just for the sake of separating. Also I was thinking about cases were we have to replicate some special file tree structure. However, right now there is no need for this and maybe never will be. The only last thing I can think of is when it comes to test functionality related to issues or PullRequests. Such dummy issues / PR I would see in this repo. Conclusion, I'll merge https://github.com/OctoLinker/e2e into this and we will use the |
72523ec
to
ee3a688
Compare
0d0bfb5
to
4d93f0b
Compare
4d93f0b
to
206e05a
Compare
206e05a
to
5fbc90b
Compare
I deleted that E2E repository and merged all the files into |
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.
Thanks, I think that makes it much easier to work with! I've got another question, but don't consider it to be blocking a merge :)
Instead of needing the annotations in the test files and using generate-fixtures-json
, could we use jest's snapshot functionality? I realize you've put a lot of effort into the current approach, and understand if you'd prefer that instead, or would just like to switch to snapshots later in a separate change (I could look on this if so).
Yes, I really put a lot of thinking into it, while I had a couple days off 😉 What would you snapshots then? We don't store any information in the DOM, so I don't know what you want to snapshots. Once #277 is resolved, we can think about snapshotting the DOM. Although we have to be really carefully what we snapshot to keep those small as possible. |
@josephfrazier I'm going to merge this PR now. Let's keep eye on snapshot testing once #277 is complete. Are you able to review the copy in e2e/readme.md raise a fix PR if needed? That would be really awesome. |
Sounds good, sorry I didn't respond earlier about the snapshotting. I was thinking we can use snapshots to store the expected test results, instead of using the I'll take a look at the E2E readme now and suggest changes. |
As requested in #477 (comment)
* Update E2E readme grammar As requested in #477 (comment) * Delete misleading headline
This is a first implementation to load the real OctoLinker browser extension in a Chrome instance using puppeteer.
I've created a separate repository which contains all the test files https://github.com/OctoLinker/e2e. End to end tests are generated on-the-fly based on the repo content so no additional PR in here is required to increase our coverage.
Before
yarn e2e
invokes the actual tests, it downloads https://github.com/OctoLinker/e2e/blob/master/resource.json which is used to generate our e2e tests. For more details visit https://github.com/OctoLinker/e2e