Browse Source

fix(project-creation): correct feature flag (#50021)

I used a wrong format in the prev PR in both test and react code. Fixing
it now
Athena Moghaddam 1 year ago
parent
commit
04b0932e49

+ 2 - 2
static/app/components/projects/useProjectCreationAccess.spec.jsx

@@ -43,7 +43,7 @@ describe('ProjectCreationAccess', function () {
   it('passes if org is part of experiment and member has no access', function () {
     const experiment_org = TestStubs.Organization({
       access: ['org:read', 'team:read', 'project:read'],
-      features: ['organizations:team-project-creation-all'],
+      features: ['team-project-creation-all'],
       experiments: [{ProjectCreationForAllExperiment: 1}],
     });
 
@@ -61,7 +61,7 @@ describe('ProjectCreationAccess', function () {
   it('fails if org is not part of experiment and member has no access', function () {
     const no_exp_org = TestStubs.Organization({
       access: ['org:read', 'team:read', 'project:read'],
-      features: ['organizations:team-project-creation-all'],
+      features: ['team-project-creation-all'],
       experiments: [{ProjectCreationForAllExperiment: 0}],
     });
 

+ 1 - 1
static/app/components/projects/useProjectCreationAccess.tsx

@@ -28,7 +28,7 @@ export function useProjectCreationAccess({
       return true;
     }
 
-    if (!organization.features.includes('organizations:team-project-creation-all')) {
+    if (!organization.features.includes('team-project-creation-all')) {
       return false;
     }
 

+ 1 - 1
static/app/views/projectInstall/createProject.spec.tsx

@@ -126,7 +126,7 @@ describe('CreateProject', function () {
     const {organization} = initializeOrg({
       organization: {
         access: ['project:read'],
-        features: ['organizations:team-project-creation-all'],
+        features: ['team-project-creation-all'],
       },
     });