]> source.dussan.org Git - sonarqube.git/commitdiff
SONARCLOUD-120 display second step on the create organization page
authorStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 15 Oct 2018 09:39:20 +0000 (11:39 +0200)
committerSonarTech <sonartech@sonarsource.com>
Tue, 16 Oct 2018 14:41:53 +0000 (16:41 +0200)
server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx
server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap

index 75b2ec6a34176599950910cdba84af9676ad1a6f..7084fe9c745eff155790435aab538e6aa97e5009 100644 (file)
@@ -186,19 +186,18 @@ export class CreateOrganization extends React.PureComponent<Props & WithRouterPr
                 organization={this.state.organization}
               />
 
-              {subscriptionPlans !== undefined &&
-                this.state.organization && (
-                  <PlanStep
-                    createOrganization={this.createOrganization}
-                    deleteOrganization={this.deleteOrganization}
-                    onFreePlanChoose={this.handleFreePlanChoose}
-                    onPaidPlanChoose={this.handlePaidPlanChoose}
-                    onlyPaid={location.state && location.state.paid === true}
-                    open={this.state.step === Step.Plan}
-                    startingPrice={formattedPrice}
-                    subscriptionPlans={subscriptionPlans}
-                  />
-                )}
+              {subscriptionPlans !== undefined && (
+                <PlanStep
+                  createOrganization={this.createOrganization}
+                  deleteOrganization={this.deleteOrganization}
+                  onFreePlanChoose={this.handleFreePlanChoose}
+                  onPaidPlanChoose={this.handlePaidPlanChoose}
+                  onlyPaid={location.state && location.state.paid === true}
+                  open={this.state.step === Step.Plan}
+                  startingPrice={formattedPrice}
+                  subscriptionPlans={subscriptionPlans}
+                />
+              )}
             </>
           )}
         </div>
index 33019aafa004097eac0adb8678aa75a946e20342..656973d99374bdecf49452548facf9eae044c95a 100644 (file)
@@ -49,6 +49,26 @@ exports[`should render and create organization 1`] = `
         onOpen={[Function]}
         open={true}
       />
+      <PlanStep
+        createOrganization={[Function]}
+        deleteOrganization={[Function]}
+        onFreePlanChoose={[Function]}
+        onPaidPlanChoose={[Function]}
+        open={false}
+        startingPrice="billing.price_format.10"
+        subscriptionPlans={
+          Array [
+            Object {
+              "maxNcloc": 100000,
+              "price": 10,
+            },
+            Object {
+              "maxNcloc": 250000,
+              "price": 75,
+            },
+          ]
+        }
+      />
     </React.Fragment>
   </div>
 </React.Fragment>