diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-10-25 15:37:19 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-11-16 20:21:05 +0100 |
commit | 427bc6b8124d501d4d759f5e0a58c11458c79be3 (patch) | |
tree | 78a52cc3fc4605476a1c44ab9230f407427bfce5 /server/sonar-web/src/main/js/apps/tutorials | |
parent | 5abfbcd37980abad5ba8d127582476d1d58b7358 (diff) | |
download | sonarqube-427bc6b8124d501d4d759f5e0a58c11458c79be3.tar.gz sonarqube-427bc6b8124d501d4d759f5e0a58c11458c79be3.zip |
SONAR-11327 Redirect user after organization creation depending on context
* Correctly handle OnboardingModal for create organization page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/tutorials')
2 files changed, 6 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx index 60a134428aa..d7a8aa94acd 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx @@ -51,6 +51,10 @@ export class OnboardingModal extends React.PureComponent<Props> { } } + handleOpenProjectOnboarding = () => { + this.props.onOpenProjectOnboarding(); + }; + render() { if (!isLoggedIn(this.props.currentUser)) { return null; @@ -68,7 +72,7 @@ export class OnboardingModal extends React.PureComponent<Props> { <p className="spacer-top">{translate('onboarding.header.description')}</p> </div> <div className="modal-simple-body text-center onboarding-choices"> - <Button className="onboarding-choice" onClick={this.props.onOpenProjectOnboarding}> + <Button className="onboarding-choice" onClick={this.handleOpenProjectOnboarding}> <OnboardingProjectIcon className="big-spacer-bottom" /> <h6 className="onboarding-choice-name"> {translate('onboarding.analyze_public_code')} diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap index 1b46fdaca66..5888278c63d 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap @@ -24,7 +24,7 @@ exports[`renders correctly 1`] = ` > <Button className="onboarding-choice" - onClick={[MockFunction]} + onClick={[Function]} > <OnboardingProjectIcon className="big-spacer-bottom" |