jupyterlab / extension-cookiecutter-ts

A cookiecutter recipe for JupyterLab extensions in Typescript
BSD 3-Clause "New" or "Revised" License
183 stars 88 forks source link

Add Jest, Playwright and pytest tests #207

Closed fcollonval closed 2 years ago

fcollonval commented 2 years ago

Fixes #137

fcollonval commented 2 years ago

GitHub workflow generated using commit 2bb2088 has been tested successfully there

fcollonval commented 2 years ago

@jtpio @bollwyvl I would like to push this forward. Could you please review it?

jtpio commented 2 years ago

Nice thanks @fcollonval this looks good :+1:

This makes the cookiecutter even more complete for folks who want to have everything set up and ready when starting a new extension. Although this adds yet other tools and framework like jest and Playwright.

I'm wondering whether we should use the JS cookiecutter as a "simpler" cookiecutter, especially for folks who would be coming from the classic notebook extension ecosystem. Some work in progress in https://github.com/jupyterlab/extension-cookiecutter-js/pull/38.

Anyway that's a discussion for a separate issue.

3coins commented 2 years ago

@bollwyvl This is useful for the dev community and will help them reduce setup time and follow testing best practices. Is there anything blocker here that shouldn't be merged?

@fcollonval Considering @bollwyvl reviews and approves this PR, is there any update required since this was last touched in March?

fcollonval commented 2 years ago

@3coins I updated the PR for using the latest galata. But otherwise it should work. You could test it by creating a dummy package if you have time; see cookiecutter documentation to use a specific branch.

3coins commented 2 years ago

@fcollonval I checked out your changes, and tested locally. Everything works, there are some minor points that we can tackle in a separate PR. I also attempted a rebase from 3.0 branch and saw some conflicts, resolved them and tried submitted a PR to help you with the merge and CI failures, but it seems like GitHub is not showing the correct diff in the PR. Here is my branch. https://github.com/3coins/extension-cookiecutter-ts/tree/3coins-add-testing

You should be able to merge your changes after a rebase from 3.0 branch. Thanks for working on this PR!

fcollonval commented 2 years ago

Thanks @3coins CI is now green.

jtpio commented 2 years ago

Thanks!

cc @3coins if you want to have a final look

3coins commented 2 years ago

@jtpio I will checkout and test again shortly.

fcollonval commented 2 years ago

@3coins I applied your suggestion and add the feature under a flag as requested during the JupyterLab meeting. Is the latest version good for you?

3coins commented 2 years ago

@fcollonval
Thanks a lot working on those updates. LGTM!