Context:
@bouncey
) and Oliver (@ojeytonwilliams) have laid the initial foundation by integrating Cypress(see #37053). This was not available in our earlier days, and has been quite a popular tool for automation testing.Goal (each requirement below can be a PR of its own)
Nice to have:
@raisedadead this sounds interesting and I'd love to help with it...I'm new to the project and still would likely need to pair up so I can learn my way around some of this stuff, but if you want the help just let me know :)
Hey Chris! Welcome. Hit us up the in the contributors chat room.
Looking good
@raisedadead As far as I know, FCC uses Jest for testing. Writing tests for Cypress currently is a little bit annoying as we have write test in Mocha. But there's a proposal on adding Jest support for Cypress. IMHO, if it isn't really important/necessary, can we wait for the proposal to land and then write all the tests in Jest just like in all the other places of FCC? This way, all of the tests written in FCC will be written is one testing language.
(P.S.: The Jest team expressed their interest in the issue to work with Cypress to add support for Jest. See this message)
Based on this comment: https://github.com/cypress-io/cypress/issues/281#issuecomment-570116671 Jest support is not currently being worked on. I think that means that we would be waiting indefinitely before we can use Jest.
@ojeytonwilliams So.... what's the approach then? Should we write tests in Mocha for now and change them in the future? Or stick with Mocha later on even though FCC uses Jest?
I'd say Mocha for now, since I don't see any alternative. If Cypress starts supporting Jest, then we can decide at that point if we want to switch.
We would still be using both in some form. Keep in mind that we would have a combination of both because, we would need both integration tests (also called unit tests), and user acceptance tests (also called e2e tests).
At the minute all the challenge tests are unit tests which are run at build time, but we would also want to be able to re-run the same tests in browser using our test runner, as e2e tests to identify broken functionalities like a real user would.
Ok.... I will look into Cypress when I have some time. Thanks for the quick response!
Create a test suite that can run against all challenges (only for certifications that we offer).
@raisedadead Are you referring to the only 5 projects that needs to be submitted to get the certs?
Most helpful comment
We would still be using both in some form. Keep in mind that we would have a combination of both because, we would need both integration tests (also called unit tests), and user acceptance tests (also called e2e tests).
At the minute all the challenge tests are unit tests which are run at build time, but we would also want to be able to re-run the same tests in browser using our test runner, as e2e tests to identify broken functionalities like a real user would.