fix: resolve API v2 test flakes with cleanup and simplified slug (#26766)
* fix: resolve API v2 test flakes by using UUID-only slug Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: add beforeAll cleanup to prevent test flakes from leftover data Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
anik@cal.com
Devin AI
parent
2f90138757
commit
9202028ab6
+5
-2
@@ -65,8 +65,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
let managedEventTypeSlug: string;
|
||||
|
||||
beforeAll(async () => {
|
||||
// Generate unique slug inside beforeAll to ensure uniqueness across test runs
|
||||
managedEventTypeSlug = `organizations-event-types-managed-${Date.now()}-${randomString()}`;
|
||||
managedEventTypeSlug = `organizations-event-types-managed-${randomString()}`;
|
||||
const moduleRef = await withApiAuth(
|
||||
userEmail,
|
||||
Test.createTestingModule({
|
||||
@@ -207,6 +206,10 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
accepted: true,
|
||||
});
|
||||
|
||||
await eventTypesRepositoryFixture.deleteAllUserEventTypes(teammate1.id);
|
||||
await eventTypesRepositoryFixture.deleteAllUserEventTypes(teammate2.id);
|
||||
await eventTypesRepositoryFixture.deleteAllTeamEventTypes(team.id);
|
||||
|
||||
app = moduleRef.createNestApplication();
|
||||
bootstrap(app as NestExpressApplication);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user