[DevOps Adoption] Refactor jest tests
The following discussion from !57210 (merged) should be addressed:
-
@blabuschagne started a discussion: Follow-up: Refactor all of the data setup logic to use a composable function.
There are a large number of frontend tests for the DevOps Adoption feature. The app specific tests (for example) require data to be setup in various ways in order to test specific functionality. As a result, there is currently a lot of duplication and similarities between tests.
We should refactor the way that we set up the data for these tests but creating a composable function which gives us the data that we need for each specific scenario. This will reduce the complexity / number of lines of code and make the tests easier to maintain and extend.
During this, we should also ensure that missed use cases are also tested.