Commit b96559b
fix: resolve flaky API v2 slots E2E tests
- Add await to unawaited bookingSeatsRepositoryFixture.create calls
- Clean up leftover selected slots before seated and variable length tests
- Add deleteAllByUserId method to SelectedSlotRepositoryFixture
The flakiness was caused by reserved slots from earlier tests leaking
into subsequent test groups. The availability calculation fetches all
unexpired reserved slots by userId (not eventTypeId), so non-seat
reserved slots from regular event type tests appeared as busy times
when computing slots for seated and variable length event types.
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>1 parent 5943a8a commit b96559b
2 files changed
Lines changed: 17 additions & 5 deletions
File tree
- apps/api/v2
- src/modules/slots/slots-2024-09-04/controllers/e2e
- test/fixtures/repository
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
| 833 | + | |
| 834 | + | |
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
| |||
865 | 867 | | |
866 | 868 | | |
867 | 869 | | |
868 | | - | |
| 870 | + | |
869 | 871 | | |
870 | 872 | | |
871 | 873 | | |
| |||
959 | 961 | | |
960 | 962 | | |
961 | 963 | | |
| 964 | + | |
| 965 | + | |
962 | 966 | | |
963 | 967 | | |
964 | 968 | | |
| |||
994 | 998 | | |
995 | 999 | | |
996 | 1000 | | |
997 | | - | |
| 1001 | + | |
998 | 1002 | | |
999 | 1003 | | |
1000 | 1004 | | |
| |||
1324 | 1328 | | |
1325 | 1329 | | |
1326 | 1330 | | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1327 | 1336 | | |
1328 | 1337 | | |
1329 | 1338 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
0 commit comments