porter-archive icon indicating copy to clipboard operation
porter-archive copied to clipboard

Start UI testing

Open joshuaharry opened this issue 1 year ago • 1 comments

Pull request type

Please check the type of change your PR introduces:

  • [ ] Bugfix
  • [ ] Feature
  • [X] Other (please describe):

Here we set up the infrastructure required to start writing basic UI tests. This includes a very simple "Hello, world!" check which makes sure the application doesn't crash when we try to render it.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • [ ] If it's a backend change, tests for the changes have been added and go test ./... runs successfully from the root folder.
  • [X] If it's a frontend change, Prettier has been run
  • [X] Docs have been reviewed and added / updated if needed

What is the current behavior?

There are no tests for the UI.

What is the new behavior?

You can now run:

npm test --prefix dashboard

And see the tests pass, albeit with lots of warnings. We'll probably need to do some cleanup later.

Technical Spec/Implementation Notes

We're using jest and react-testing-library to kick things off with unit testing. There are a number of other practices we'll want to implement as we go; the idea here is to start with a small, simple improvement with a lot of value. (I've avoided accidentally bricking production a couple times thanks to tests like this one!)

joshuaharry avatar Apr 15 '23 01:04 joshuaharry

dashboard/package-lock.json conflicts need resolving

jusrhee avatar Apr 25 '23 14:04 jusrhee