Skip to content
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

Explore: Add e2e-testing with Spectron #1773

Merged
merged 6 commits into from Dec 23, 2019
Merged

Explore: Add e2e-testing with Spectron #1773

merged 6 commits into from Dec 23, 2019

Conversation

dmsnell
Copy link
Contributor

@dmsnell dmsnell commented Dec 10, 2019

In this patch we're creating the most basic form of end-to-end testing
using the Spectron framework. This boots the app and verifies that it
opens.

The files aren't in the right spot and the structure of the tests need
to change but this gives us an idea of how to run these tests.

Testing

Checkout this branch and run the tests setting the username/password
for some test account.

TEST_USERNAME="[email protected]" TEST_PASSWORD="blarg" npm test

You should see the app appear and the credentials entered automatically
into the login form.

Notes

  • We can't run the tests with the DevTools open or they will fail
  • This was pretty simple to get setup
  • We need to see if we can get these running in CI for us so that they can approve or reject a PR based on the results of the test
  • According to the docs we have to run a specific version of Spectron corresponding to the version of Electron in use

Links

@dmsnell dmsnell requested review from beaucollins and Dec 10, 2019
Copy link
Member

@codebykat codebykat left a comment

This is awesome! Seems like a great start. Not sure what kind of review you want at this point but I'll approve to say the code looks good and it works.

@dmsnell
Copy link
Contributor Author

@dmsnell dmsnell commented Dec 12, 2019

Thanks @codebykat - were you able to get the tests to run on your computer?

I think I'd like to let this sit for another day or two and give people the chance to comment, but after that I'd like to get it merged even with all its shortcomings so that we can start.

I'm thinking that for now we don't need to have these automated as it would suffice for now if we had an end-to-end test suite to run it locally as a verification step before making a release. That could save us considerable headache.

@belcherj
Copy link
Contributor

@belcherj belcherj commented Dec 13, 2019

This is causing CI to fail. Once that is resolved ping me for a review.

@codebykat
Copy link
Member

@codebykat codebykat commented Dec 17, 2019

The tests did run for me, yes.

@dmsnell
Copy link
Contributor Author

@dmsnell dmsnell commented Dec 17, 2019

When I get back around to this I'd like to move the e2e testing out of CI for now and let it be a manual process. We can iterate on it later and taking it out of the automated tests is surely going to make it easier in the beginning.

@belcherj
Copy link
Contributor

@belcherj belcherj commented Dec 18, 2019

Sounds good!

dmsnell added 2 commits Dec 20, 2019
In this patch we're creating the most basic form of end-to-end testing
using the Spectron framework. This boots the app and verifies that it
opens.

The files aren't in the right spot and the structure of the tests need
to change but this gives us an idea of how to run these tests.
@dmsnell dmsnell merged commit 9ebf100 into develop Dec 23, 2019
5 checks passed
@dmsnell dmsnell deleted the add/e2e-testing branch Dec 23, 2019
@codebykat codebykat added this to the 1.14 milestone Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants