-
Notifications
You must be signed in to change notification settings - Fork 3
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 Puppeteer for End-to-End Tests #567
Conversation
for more information, see https://pre-commit.ci
That would be awesome quite honestly, both for perfect testing assurance as well as keeping documentation up-to-date Could you try that in a splinter branch follow-up PR that uses this one as a base? |
Note for getting the CI to have the test data, I'd follow the approach of NeuroConv, where a new workflow handles download and caching per platform by downloading from the aws copies (I will probably need to set some secrets for this however): https://github.com/catalystneuro/neuroconv/blob/main/.github/workflows/testing.yml#L113-L127 |
Huh, pretty cool how easy that looks to setup/configure! The CI seems to complain about not connecting to the port however |
TODO: Garrett is investigating a self-hosted runner for this since GitHub Actions seems to have problems with headless state? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Printed out all the messages from Electron and actually getting somewhere now! However, there are different behaviors for each operating system... LinuxDoes not support display, so closes Electron on start.
MacIs just timing out? Looks like there are some GPU issues, but nothing seems to be failing...
WindowsThis one doesn't even seem to start. Doing some more logging to see what's happening under the hood.
|
@CodyCBakerPhD Mac is working. Will have to play around with Windows / Linux to see if I can get past these issues. Would you mind running these tests locally on your PC to see if it works? |
Fixed Ubuntu using the suggestions in microsoft/playwright#11932 |
Great news; I'd be happy to start off with this running on only a single (or now I suppose two, since you got it) platform(s) and only adding more if easy to do |
When I run locally on windows, the tests start fine and the app even launches, then leads to with
in the console |
But if you'd rather deal with windows in a follow up, just let me know, and configure this PR to only run the e2e test on a subset of the platforms |
Think I got it after testing locally myself. Turns out the startup time for Electron is really slow on Windows (~40s for me until the window is ready). I've made the tests wait for a "ready" message from the Electron subprocess before beginning, otherwise will timeout if this takes longer than a minute to receive. |
Probably ideal to merge this in as a basic integration of
Though these may end up being closely related. Let me know if you'd like to proceed in a different way. |
for more information, see https://pre-commit.ci
@garrettmflynn Incredible work! This is fantastic Got it to work on my own system, but it took a couple of tries so maybe retrying is all it takes |
This PR adds
puppeteer
to our stack to enable end-to-end tests. The current code implements a basic check for the number of pipelines (should always be zero because the test is using a scoped home folder that is wiped each time), then takes a screenshot of the home page.I'm open to whatever additions to this PR before merging so that it's useful. I thought we might implement a full E2E test using the GIN testing data—which would also allow us to auto-generate screenshots for our new tutorial—but I wanted to confirm the best way to introduce these features.