Closed fzhao99 closed 3 weeks ago
Bobby found some other flaking tests due to a similar issue so trying to fix them. If anyone finds any other ones please let me know!
@bobbywells52 I've gotten these to pass pretty consistently locally / got a string of successful runs in CI. Guessing even if we didn't get to the root cause of the flakiness that this will help, so going to propose merging it.
Happy to pair further on whether there might be another cause / config misalignment locally
@bobbywells52 I've gotten these to pass pretty consistently locally / got a string of successful runs in CI. Guessing even if we didn't get to the root cause of the flakiness that this will help, so going to propose merging it.
Happy to pair further on whether there might be another cause / config misalignment locally
Taking a look rn -- if I get a good string of runs I'll approve. Def down to pair and get to the root!
Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
15.0% Duplication on New Code (required ≤ 3%)
FRONTEND PULL REQUEST
Noticed there was a flaky test that we added after some of the recent test card additions, so putting up a PR to fix.
Took the opportunity to do some fixture refactoring as well since adding in the mock was way more of a pain in the neck due to the needed constants being split between files.
Think the core issue here is that our current setup requiring interaction-to-interaction testing mocks seems to work sometimes with Apollo mocking provider when missing, but then fails other times. The larger fix is to use a system that can just reuse mocks rather than having to manually specify it every time, which we might be able to do with our work with msw.
Changes Proposed
PR is mainly moving a bunch of test constants around so the diff is bigger than it looks. Should be a no-op that can be tested by re-running the testing job
Testing
Rerun the frontend testing process a few times and verify they pass determinantly. Got a string of successful runs in a row working here (red X failure is from Sonar duplication issues, even though the actual frontend test job is working fine)