fixme icon indicating copy to clipboard operation
fixme copied to clipboard

There are no tests

Open alexdor opened this issue 7 years ago • 14 comments

Currently there are no tests in this repo. It would be nice if we could write some tests.

alexdor avatar Mar 02 '19 14:03 alexdor

tests like CicleCI?

nik72619c avatar Mar 02 '19 22:03 nik72619c

Before we add a CI, we first have to write them in Jest. Afterwards we could add a CI so it could run the tests automatically : )

alexdor avatar Mar 03 '19 09:03 alexdor

Could you provide some scenarios...what are the tests gonna be regarding?

nik72619c avatar Mar 03 '19 10:03 nik72619c

It would be nice to test the following:

  • Test that all pages render without crashing
  • Test that Learn More button works
  • Test that Issue, Projects, About links work
  • Test that 18 Projects navigates to projects page when clicked
  • Test the search form in the homepage
  • Test that the form in the issues page works and that it updates the url
  • Test that the form in the issues page parses properly the url params (for example when navigating to this https://fixme.ossn.club/issues?experience_needed=moderate&language=javascript&type=bugfix&project_id=c03fc409-d943-4b18-9fa3-78c46a1f06cc&ordering= the website should parse the language, the project_id and the type and it should enable the checkboxes on the filter form)
  • Test that each issue card is a link (at the issues page)
  • Test that each project card (at the projects page)

Of course not all of the tests have to be done at once but we can start with a few and then add more on top of them.

alexdor avatar Mar 03 '19 12:03 alexdor

Sounds good...gonna work on this

nik72619c avatar Mar 03 '19 13:03 nik72619c

Sounds good, let me know if you face any issues : )

alexdor avatar Mar 03 '19 13:03 alexdor

This seems like a big task. @nik72619c Maybe we can share this task.

aswinmprabhu avatar Mar 10 '19 13:03 aswinmprabhu

@aswinmprabhu sounds like a good idea, I don't know the status of @nik72619c's work but splitting it up would unburden him a lot I think

alexdor avatar Mar 11 '19 12:03 alexdor

no issues !

nik72619c avatar Mar 11 '19 12:03 nik72619c

@nik72619c could you upload a version with the basic structure that you are working on in the repo so that both of you work on the same structure?

alexdor avatar Mar 11 '19 12:03 alexdor

the structure that I am working on consists of a test folder inside components folder, so is it okay @alexdor ?

nik72619c avatar Mar 11 '19 15:03 nik72619c

Usually you add general tests inside the src folder and component specific tests inside each component folder. But your solution could work as well : )

Could you split up the tests between you two so you don't have any overlap on your work?

alexdor avatar Mar 11 '19 15:03 alexdor

yea sure I will just finish up with my checklist of tests and rest can be taken up by @aswinmprabhu

nik72619c avatar Mar 11 '19 15:03 nik72619c

Hey @nik72619c, can you push your scaffold soon so that I can start working? Also what library are you using? react-testing-library + Jest seems like a great fit.

aswinmprabhu avatar Mar 14 '19 17:03 aswinmprabhu