synthetic-monitoring-app icon indicating copy to clipboard operation
synthetic-monitoring-app copied to clipboard

Add an object factory to create SM fixtures

Open ckbedwell opened this issue 7 months ago • 0 comments

Problem

At the beginning of this year I refactored the test data to be consistent across tests so there is a singular point of reference which all of our tests utilise. This is a great improvement but some tests require specific values to ensure they work correctly and often these values are unclear and opaque in nature.

Completion criteria

  • [ ] Introduce Fishery as an object factory to generate our test fixtures.
  • [ ] Where appropriate change some of our tests to utilise Fishery rather than using the global fixtures (e.g. BulkEditModal.test.tsx) -- note: it isn't a requirement to change all of our tests to utilise Fishery to consider this ticket complete but the goal is to get the ball rolling.
  • [ ] Ensure your solution allows us to utilise the object factory OUTSIDE of tests easily.

On the last point: one of the benefits of utilising Fishery is for us to mock data whilst developing locally. An example where this could be applied -- currently our call to the checks list api is not paginated and returns all checks. Some of our users have 1000s of checks and it would be a very interesting experiment to mock these 1000 of checks in the UI and see what happens and aid in developing solutions.

ckbedwell avatar Jul 03 '24 11:07 ckbedwell