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

Tests in Browser #38611

Closed
4 of 10 tasks
raisedadead opened this issue Apr 22, 2020 · 11 comments
Closed
4 of 10 tasks

Tests in Browser #38611

raisedadead opened this issue Apr 22, 2020 · 11 comments
Labels
help wanted Open for all. You do not need permission to work on these. platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have

Comments

@raisedadead
Copy link
Member

raisedadead commented Apr 22, 2020

Context:

Goal (each requirement below can be a PR of its own)

  • Create a test suite that can run against all challenges (only for certifications that we offer).
  • Create and add suites for testing user workflows.
    • Sign up / Sign in
    • Email change / update
    • Changes to profile data
    • a11y tests and lighthouse tests?
  • Create and add suites for testing navigations and layouts across devices.
  • Update documentation about e2e tests
  • ... add more.

Nice to have:

  • Challenge tests could be run only for changes on PRs and all tests when on master?
@raisedadead raisedadead added type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have help wanted Open for all. You do not need permission to work on these. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. labels Apr 22, 2020
@ckujawa
Copy link

ckujawa commented Apr 24, 2020

@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 :)

@raisedadead
Copy link
Member Author

Hey Chris! Welcome. Hit us up the in the contributors chat room.

@Bonniebiotch

This comment was marked as spam.

@Twaha-Rahman
Copy link
Contributor

Twaha-Rahman commented May 17, 2020

@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)

@ojeytonwilliams
Copy link
Contributor

Based on this comment: cypress-io/cypress#281 (comment) Jest support is not currently being worked on. I think that means that we would be waiting indefinitely before we can use Jest.

@Twaha-Rahman
Copy link
Contributor

Twaha-Rahman commented May 18, 2020

@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?

@ojeytonwilliams
Copy link
Contributor

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.

@raisedadead
Copy link
Member Author

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.

@Twaha-Rahman
Copy link
Contributor

Ok.... I will look into Cypress when I have some time. Thanks for the quick response!

@Twaha-Rahman
Copy link
Contributor

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?

@Sembauke
Copy link
Member

Sembauke commented Sep 7, 2021

Hey,
Going to close this one as outdated.
Will open a new one once new tests can be added.

@Sembauke Sembauke closed this as completed Sep 7, 2021
@Sembauke Sembauke reopened this Sep 7, 2021
@moT01 moT01 closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have
Projects
None yet
Development

No branches or pull requests

8 participants
@ckujawa @raisedadead @ojeytonwilliams @moT01 @Twaha-Rahman @Sembauke @Bonniebiotch and others