Skip to content

Commit e9e9667

Browse files
fix: remove shared pbac feature flag deletion from e2e test cleanup (calcom#28573)
The afterAll hooks in PBAC-related e2e specs were deleting the global 'pbac' feature definition via featuresRepositoryFixture.deleteBySlug(). When multiple test suites run in parallel, one suite's cleanup would delete the feature while other suites still depend on it, causing intermittent failures. Each test already creates its own team-level feature flag association and cleans that up correctly. The global feature definition does not need per-suite deletion and is better left intact to avoid cross-suite interference. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent b46c04d commit e9e9667

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

apps/api/v2/src/modules/organizations/roles/organizations-roles.controller.e2e-spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,6 @@ describe("Organizations Roles Endpoints", () => {
626626
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithRolePermission.email);
627627
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithoutRolePermission.email);
628628
await userRepositoryFixture.deleteByEmail(nonOrgUser.email);
629-
630-
try {
631-
await featuresRepositoryFixture.deleteBySlug("pbac");
632-
} catch (error) {
633-
console.error("Cleanup error:", error);
634-
}
635629
} catch (error) {
636630
console.error("Cleanup error:", error);
637631
} finally {

apps/api/v2/src/modules/organizations/roles/permissions/organizations-roles-permissions.controller.e2e-spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,6 @@ describe("Organizations Roles Permissions Endpoints", () => {
382382

383383
// Clean up user
384384
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithRolePermission.email);
385-
386-
// Clean up feature definition
387-
try {
388-
await featuresRepositoryFixture.deleteBySlug("pbac");
389-
} catch (err) {
390-
console.log(err);
391-
}
392385
} catch (err) {
393386
console.log(err);
394387
} finally {

apps/api/v2/src/modules/organizations/teams/roles/organizations-teams-roles.controller.e2e-spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,6 @@ describe("Organizations Roles Endpoints", () => {
457457
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithRolePermission.email);
458458
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithoutRolePermission.email);
459459
await userRepositoryFixture.deleteByEmail(nonOrgUser.email);
460-
461-
try {
462-
await featuresRepositoryFixture.deleteBySlug("pbac");
463-
} catch (error) {
464-
console.error("Cleanup error:", error);
465-
}
466460
} catch (error) {
467461
console.error("Cleanup error:", error);
468462
} finally {

apps/api/v2/src/modules/organizations/teams/roles/permissions/organizations-teams-roles-permissions.controller.e2e-spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ describe("Organizations Teams Roles Permissions Endpoints", () => {
274274

275275
// Clean up user
276276
await userRepositoryFixture.deleteByEmail(pbacOrgUserWithRolePermission.email);
277-
278-
// Clean up feature definition
279-
try {
280-
await featuresRepositoryFixture.deleteBySlug("pbac");
281-
} catch (err) {
282-
console.log(err);
283-
}
284277
} catch (err) {
285278
console.log(err);
286279
} finally {

0 commit comments

Comments
 (0)