diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-10-15 11:39:20 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-10-16 16:41:53 +0200 |
commit | 6458b881683319e1442ef78d6b8367ff6ded9720 (patch) | |
tree | e92d824b7ff65df5738dfcf75d2fb44b117694f1 /server/sonar-web/src/main/js | |
parent | 03c41366eec4aae26a8645c674179e0775c786b9 (diff) | |
download | sonarqube-6458b881683319e1442ef78d6b8367ff6ded9720.tar.gz sonarqube-6458b881683319e1442ef78d6b8367ff6ded9720.zip |
SONARCLOUD-120 display second step on the create organization page
Diffstat (limited to 'server/sonar-web/src/main/js')
2 files changed, 32 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx index 75b2ec6a341..7084fe9c745 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx @@ -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> diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap index 33019aafa00..656973d9937 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap @@ -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> |