Closed saulshanabrook closed 6 years ago
@ellisonbg @tkinz27 Do either of you wanna review this? Hopefully these last tests will pass on Travis.
I wasn't sure if there was any previous work on testing JupterLab extensions in CI.
Cool, I don't know of work done to help us test extensions. I am fine with merging and iterating on this.
Ping @blink1073 @jasongrout @ian-r-rose to see if this would be useful more broadly.
@saulshanabrook Interesting, I have not looked at Cypress much. I run tests for @jupyterlab/google-drive
in CI using karma, in case you are interested in looking at another approach to this problem.
Cypress looks great, thanks for the ping! Until they merge support for unit tests on their roadmap, I'd say it is not yet appropriate to replace our karma infrastructure, since Cypress does a lot of setup work between test items. It is certainly a great replacement for Selenium. We had currently only used Selenium to make sure the page loads and that no errors or warnings happen during app startup.
This was my first time using Cypress and I really enjoyed it. I created all the tests using cypress open
, which let me easily re-run my tests when I changed a file and use the web inspector to understand what was going wrong.
I didn't add any unit tests here, because I am less familiar with the JupyterLab internals. It was easier for me to understand what the behavior should be than how any of it works under the covers.
@ian-r-rose I notice in the @jupyterlab/google-drive
CI setup that you install jupyterlab from the source. Is this just to make sure it's compatible with master?
@saulshanabrook, yes, it is a bit more complicated than it would be otherwise in order to test against JupyterLab master. Once development on that stabilizes I will probably switch to testing against released packages.
Add integration testing with Cypress. This makes sure we can open CSV and JSON files and voyager and that the windows stay open when we reload.
This runs the non-docker based testing in Travis. In the future, it would be good to run both docker and non docker in CI, so we can verify that both methods are working for development.