Test failed only with the recorded calls
Briefly, this is what happened
- test-integration passed
- test-record passed
- test failed
The example is located in src/components/uploads/UploadsPage.spec.js in branch MockedAPI.
After some investigation, the following things need to be fixed:
Fix the URL stored for calls in the snapshot files
Introduce a separate snapshot file for each test case: this ensures that each test uses the data from the actual API call.
Separate Keycloak state for each test to ensure that login state is isolated between tests.
Need to ensure that the test state is fully ready before running the tests. Both the login and the processing need to be fully done before entering the tests. This is now done with a simple 2 sec wait: a more proper mechanism should be implemented later.