aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/tutorials/manual
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/tutorials/manual')
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx115
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/__tests__/DoneNextSteps-test.tsx35
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/__tests__/__snapshots__/DoneNextSteps-test.tsx.snap158
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx11
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx11
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx11
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx11
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/Other.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/CLangGCCCommand-test.tsx12
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx7
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx7
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx7
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx7
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/ExecScanner-test.tsx13
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaGradle-test.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaMaven-test.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/Other-test.tsx9
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap115
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap25
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap25
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap26
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap24
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap24
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap124
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap29
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap29
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap23
32 files changed, 798 insertions, 101 deletions
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx
new file mode 100644
index 00000000000..729bd9cbfb7
--- /dev/null
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx
@@ -0,0 +1,115 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
+import { Link } from 'react-router';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../apps/settings/components/AdditionalCategoryKeys';
+import { getProjectSettingsUrl } from '../../../helpers/urls';
+
+export interface DoneNextStepsProps {
+ component: T.Component;
+}
+
+export default function DoneNextSteps({ component }: DoneNextStepsProps) {
+ const tutorialsLink = (
+ <Link to={{ pathname: '/tutorials', query: { id: component.key } }}>
+ {translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.see_tutorials'
+ )}
+ </Link>
+ );
+ const isProjectAdmin = component.configuration?.showSettings;
+
+ return (
+ <>
+ <hr className="big-spacer-top big-spacer-bottom" />
+
+ <p>
+ <strong>{translate('onboarding.analysis.auto_refresh_after_analysis.done')}</strong>{' '}
+ {translate('onboarding.analysis.auto_refresh_after_analysis.auto_refresh')}
+ </p>
+ <p className="big-spacer-top">
+ {isProjectAdmin ? (
+ <FormattedMessage
+ defaultMessage={translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin'
+ )}
+ id="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin"
+ values={{
+ link_project_settings: (
+ <Link
+ to={getProjectSettingsUrl(
+ component.key,
+ PULL_REQUEST_DECORATION_BINDING_CATEGORY
+ )}>
+ {translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.project_settings'
+ )}
+ </Link>
+ ),
+ link_see_tutorials: tutorialsLink
+ }}
+ />
+ ) : (
+ <FormattedMessage
+ defaultMessage={translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci'
+ )}
+ id="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci"
+ values={{
+ link_see_tutorials: tutorialsLink
+ }}
+ />
+ )}
+ </p>
+ <p className="big-spacer-top">
+ <FormattedMessage
+ defaultMessage={translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.check_these_links'
+ )}
+ id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
+ values={{
+ link_branches: (
+ <Link
+ to="/documentation/branches/overview/"
+ target="_blank"
+ rel="noopener noreferrer">
+ {translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches'
+ )}
+ </Link>
+ ),
+ link_pr_analysis: (
+ <Link
+ to="/documentation/analysis/pull-request/"
+ target="_blank"
+ rel="noopener noreferrer">
+ {translate(
+ 'onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis'
+ )}
+ </Link>
+ )
+ }}
+ />
+ </p>
+ </>
+ );
+}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/DoneNextSteps-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/DoneNextSteps-test.tsx
new file mode 100644
index 00000000000..9c391389bd5
--- /dev/null
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/DoneNextSteps-test.tsx
@@ -0,0 +1,35 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import { mockComponent } from '../../../../helpers/testMocks';
+import DoneNextSteps, { DoneNextStepsProps } from '../DoneNextSteps';
+
+it('should render correctly', () => {
+ expect(shallowRender()).toMatchSnapshot('default');
+ expect(
+ shallowRender({ component: mockComponent({ configuration: { showSettings: true } }) })
+ ).toMatchSnapshot('project admin');
+});
+
+function shallowRender(props: Partial<DoneNextStepsProps> = {}) {
+ return shallow<DoneNextStepsProps>(<DoneNextSteps component={mockComponent()} {...props} />);
+}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/__snapshots__/DoneNextSteps-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/__snapshots__/DoneNextSteps-test.tsx.snap
new file mode 100644
index 00000000000..0b6489a943d
--- /dev/null
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/__snapshots__/DoneNextSteps-test.tsx.snap
@@ -0,0 +1,158 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render correctly: default 1`] = `
+<Fragment>
+ <hr
+ className="big-spacer-top big-spacer-bottom"
+ />
+ <p>
+ <strong>
+ onboarding.analysis.auto_refresh_after_analysis.done
+ </strong>
+
+ onboarding.analysis.auto_refresh_after_analysis.auto_refresh
+ </p>
+ <p
+ className="big-spacer-top"
+ >
+ <FormattedMessage
+ defaultMessage="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci"
+ id="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci"
+ values={
+ Object {
+ "link_see_tutorials": <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/tutorials",
+ "query": Object {
+ "id": "my-project",
+ },
+ }
+ }
+ >
+ onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.see_tutorials
+ </Link>,
+ }
+ }
+ />
+ </p>
+ <p
+ className="big-spacer-top"
+ >
+ <FormattedMessage
+ defaultMessage="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
+ id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
+ values={
+ Object {
+ "link_branches": <Link
+ onlyActiveOnIndex={false}
+ rel="noopener noreferrer"
+ style={Object {}}
+ target="_blank"
+ to="/documentation/branches/overview/"
+ >
+ onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
+ </Link>,
+ "link_pr_analysis": <Link
+ onlyActiveOnIndex={false}
+ rel="noopener noreferrer"
+ style={Object {}}
+ target="_blank"
+ to="/documentation/analysis/pull-request/"
+ >
+ onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
+ </Link>,
+ }
+ }
+ />
+ </p>
+</Fragment>
+`;
+
+exports[`should render correctly: project admin 1`] = `
+<Fragment>
+ <hr
+ className="big-spacer-top big-spacer-bottom"
+ />
+ <p>
+ <strong>
+ onboarding.analysis.auto_refresh_after_analysis.done
+ </strong>
+
+ onboarding.analysis.auto_refresh_after_analysis.auto_refresh
+ </p>
+ <p
+ className="big-spacer-top"
+ >
+ <FormattedMessage
+ defaultMessage="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin"
+ id="onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin"
+ values={
+ Object {
+ "link_project_settings": <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/settings",
+ "query": Object {
+ "category": "pull_request_decoration_binding",
+ "id": "my-project",
+ },
+ }
+ }
+ >
+ onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.project_settings
+ </Link>,
+ "link_see_tutorials": <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/tutorials",
+ "query": Object {
+ "id": "my-project",
+ },
+ }
+ }
+ >
+ onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.see_tutorials
+ </Link>,
+ }
+ }
+ />
+ </p>
+ <p
+ className="big-spacer-top"
+ >
+ <FormattedMessage
+ defaultMessage="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
+ id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
+ values={
+ Object {
+ "link_branches": <Link
+ onlyActiveOnIndex={false}
+ rel="noopener noreferrer"
+ style={Object {}}
+ target="_blank"
+ to="/documentation/branches/overview/"
+ >
+ onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
+ </Link>,
+ "link_pr_analysis": <Link
+ onlyActiveOnIndex={false}
+ rel="noopener noreferrer"
+ style={Object {}}
+ target="_blank"
+ to="/documentation/analysis/pull-request/"
+ >
+ onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
+ </Link>,
+ }
+ }
+ />
+ </p>
+</Fragment>
+`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx
index e679a08c2fc..1cb28a011d1 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx
@@ -40,26 +40,25 @@ export default function AnalysisCommand(props: AnalysisCommandProps) {
}
const host = getHostUrl();
- const projectKey = component.key;
switch (languageConfig.buildTool) {
case BuildTools.Maven:
- return <JavaMaven host={host} projectKey={projectKey} token={token} />;
+ return <JavaMaven host={host} component={component} token={token} />;
case BuildTools.Gradle:
- return <JavaGradle host={host} projectKey={projectKey} token={token} />;
+ return <JavaGradle host={host} component={component} token={token} />;
case BuildTools.DotNet:
- return <DotNet host={host} projectKey={projectKey} token={token} />;
+ return <DotNet host={host} component={component} token={token} />;
case BuildTools.CFamily:
return languageConfig.os !== undefined ? (
- <ClangGCCCustom os={languageConfig.os} host={host} projectKey={projectKey} token={token} />
+ <ClangGCCCustom os={languageConfig.os} host={host} component={component} token={token} />
) : null;
case BuildTools.Other:
return languageConfig.os !== undefined ? (
- <Other host={host} os={languageConfig.os} projectKey={projectKey} token={token} />
+ <Other host={host} os={languageConfig.os} component={component} token={token} />
) : null;
default:
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx
index 1fc693c4cc0..a49fed27b0d 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ClangGCCCommand.tsx
@@ -25,21 +25,21 @@ import ExecBuildWrapper from './ExecBuildWrapper';
import ExecScanner from './ExecScanner';
export interface ClangGCCCustomProps {
+ component: T.Component;
host: string;
os: OSs;
- projectKey: string;
token: string;
}
export default function ClangGCCCustom(props: ClangGCCCustomProps) {
- const { os, host, projectKey, token } = props;
+ const { os, host, component, token } = props;
return (
<div>
<DownloadBuildWrapper os={os} />
<DownloadScanner os={os} />
<ExecBuildWrapper os={os} />
- <ExecScanner host={host} projectKey={projectKey} os={os} token={token} cfamily={true} />
+ <ExecScanner host={host} component={component} os={os} token={token} cfamily={true} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx
index 03956c08f93..1ba53cf6225 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx
@@ -23,8 +23,8 @@ import DotNetCore from './DotNetCore';
import DotNetFramework from './DotNetFramework';
export interface DotNetProps {
+ component: T.Component;
host: string;
- projectKey: string;
token: string;
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx
index d667ced97e2..9d74fe62b43 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx
@@ -26,10 +26,10 @@ import { DotNetProps } from './DotNet';
import DotNetExecute from './DotNetExecute';
export default function DotNetCore(props: DotNetProps) {
- const { host, projectKey, token } = props;
+ const { host, component, token } = props;
const commands = [
- `dotnet sonarscanner begin /k:"${projectKey}" /d:sonar.host.url="${host}" /d:sonar.login="${token}"`,
+ `dotnet sonarscanner begin /k:"${component.key}" /d:sonar.host.url="${host}" /d:sonar.login="${token}"`,
'dotnet build',
`dotnet sonarscanner end /d:sonar.login="${token}"`
];
@@ -46,7 +46,7 @@ export default function DotNetCore(props: DotNetProps) {
<Alert className="spacer-top" variant="info">
{translate('onboarding.analysis.dotnetcore.global.text.path')}
</Alert>
- <DotNetExecute commands={commands} />
+ <DotNetExecute commands={commands} component={component} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx
index ec2e272d8a8..56091251a9a 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx
@@ -24,12 +24,14 @@ import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import DoneNextSteps from '../DoneNextSteps';
export interface DotNetExecuteProps {
commands: string[];
+ component: T.Component;
}
-export default function DotNetExecute({ commands }: DotNetExecuteProps) {
+export default function DotNetExecute({ commands, component }: DotNetExecuteProps) {
return (
<>
<h4 className="huge-spacer-top spacer-bottom">
@@ -55,6 +57,7 @@ export default function DotNetExecute({ commands }: DotNetExecuteProps) {
}}
/>
</p>
+ <DoneNextSteps component={component} />
</>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx
index 0ead421f64b..2542db69702 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx
@@ -24,10 +24,10 @@ import { DotNetProps } from './DotNet';
import DotNetExecute from './DotNetExecute';
export default function DotNetFramework(props: DotNetProps) {
- const { host, projectKey, token } = props;
+ const { host, component, token } = props;
const commands = [
- `SonarScanner.MSBuild.exe begin /k:"${projectKey}" /d:sonar.host.url="${host}" /d:sonar.login="${token}"`,
+ `SonarScanner.MSBuild.exe begin /k:"${component.key}" /d:sonar.host.url="${host}" /d:sonar.login="${token}"`,
'MsBuild.exe /t:Rebuild',
`SonarScanner.MSBuild.exe end /d:sonar.login="${token}"`
];
@@ -57,7 +57,7 @@ export default function DotNetFramework(props: DotNetProps) {
</p>
</div>
- <DotNetExecute commands={commands} />
+ <DotNetExecute commands={commands} component={component} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx
index cc595bb0d03..a3c2083ec34 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx
@@ -25,22 +25,23 @@ import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
import { OSs } from '../../types';
import { quote } from '../../utils';
+import DoneNextSteps from '../DoneNextSteps';
export interface ExecScannerProps {
+ component: T.Component;
host: string;
os: OSs;
- projectKey: string;
token: string;
cfamily?: boolean;
}
export default function ExecScanner(props: ExecScannerProps) {
- const { host, os, projectKey, token, cfamily } = props;
+ const { host, os, component, token, cfamily } = props;
const q = quote(os);
const command = [
os === OSs.Windows ? 'sonar-scanner.bat' : 'sonar-scanner',
- '-D' + q(`sonar.projectKey=${projectKey}`),
+ '-D' + q(`sonar.projectKey=${component.key}`),
'-D' + q('sonar.sources=.'),
cfamily ? '-D' + q('sonar.cfamily.build-wrapper-output=bw-output') : undefined,
'-D' + q(`sonar.host.url=${host}`),
@@ -69,9 +70,7 @@ export default function ExecScanner(props: ExecScannerProps) {
}}
/>
</p>
- <p className="big-spacer-top markdown">
- {translate('onboarding.analysis.auto_refresh_after_analysis')}
- </p>
+ <DoneNextSteps component={component} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx
index 16fc994a8f4..773148047c2 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx
@@ -23,20 +23,21 @@ import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import DoneNextSteps from '../DoneNextSteps';
export interface JavaGradleProps {
+ component: T.Component;
host: string;
- projectKey: string;
token: string;
}
export default function JavaGradle(props: JavaGradleProps) {
- const { host, projectKey, token } = props;
+ const { host, component, token } = props;
const config = 'plugins {\n id "org.sonarqube" version "3.3"\n}';
const command = [
'./gradlew sonarqube',
- `-Dsonar.projectKey=${projectKey}`,
+ `-Dsonar.projectKey=${component.key}`,
`-Dsonar.host.url=${host}`,
`-Dsonar.login=${token}`
];
@@ -91,9 +92,7 @@ export default function JavaGradle(props: JavaGradleProps) {
}}
/>
</p>
- <p className="big-spacer-top markdown">
- {translate('onboarding.analysis.auto_refresh_after_analysis')}
- </p>
+ <DoneNextSteps component={component} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx
index 7a9b4b6849d..d6e00ac2fbf 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx
@@ -23,18 +23,19 @@ import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import DoneNextSteps from '../DoneNextSteps';
export interface JavaMavenProps {
+ component: T.Component;
host: string;
- projectKey: string;
token: string;
}
export default function JavaMaven(props: JavaMavenProps) {
- const { host, projectKey, token } = props;
+ const { host, component, token } = props;
const command = [
'mvn sonar:sonar',
- `-Dsonar.projectKey=${projectKey}`,
+ `-Dsonar.projectKey=${component.key}`,
`-Dsonar.host.url=${host}`,
`-Dsonar.login=${token}`
];
@@ -59,9 +60,7 @@ export default function JavaMaven(props: JavaMavenProps) {
}}
/>
</p>
- <p className="big-spacer-top markdown">
- {translate('onboarding.analysis.auto_refresh_after_analysis')}
- </p>
+ <DoneNextSteps component={component} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/Other.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/Other.tsx
index 7db9c3880bb..ac53a410e21 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/Other.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/Other.tsx
@@ -23,19 +23,19 @@ import DownloadScanner from './DownloadScanner';
import ExecScanner from './ExecScanner';
export interface OtherProps {
+ component: T.Component;
host: string;
os: OSs;
- projectKey: string;
token: string;
}
export default function Other(props: OtherProps) {
- const { host, os, projectKey, token } = props;
+ const { host, os, component, token } = props;
return (
<div>
<DownloadScanner os={os} />
- <ExecScanner host={host} os={os} projectKey={projectKey} token={token} />
+ <ExecScanner host={host} os={os} component={component} token={token} />
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/CLangGCCCommand-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/CLangGCCCommand-test.tsx
index d35ea6ba31e..574c5fbb785 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/CLangGCCCommand-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/CLangGCCCommand-test.tsx
@@ -19,11 +19,19 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import { OSs } from '../../../types';
import ClangGCCCommand from '../ClangGCCCommand';
-it('Shoud renders correctly', () => {
+it('should render correctly', () => {
expect(
- shallow(<ClangGCCCommand os={OSs.Linux} host="host" projectKey="projectKey" token="token" />)
+ shallow(
+ <ClangGCCCommand
+ os={OSs.Linux}
+ host="host"
+ component={mockComponent({ key: 'projectKey' })}
+ token="token"
+ />
+ )
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx
index dd5408d54eb..86e50f914ba 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx
@@ -19,8 +19,11 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import DotNet from '../DotNet';
-it('Should renders correctly', () => {
- expect(shallow(<DotNet host="host" projectKey="projectKey" token="token" />)).toMatchSnapshot();
+it('should render correctly', () => {
+ expect(
+ shallow(<DotNet host="host" component={mockComponent({ key: 'projectKey' })} token="token" />)
+ ).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx
index 5a3693177d5..563cae7b1ab 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx
@@ -19,8 +19,11 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import DotNetExecute from '../DotNetExecute';
-it('Should renders correctly', () => {
- expect(shallow(<DotNetExecute commands={['command1', 'command2']} />)).toMatchSnapshot();
+it('should render correctly', () => {
+ expect(
+ shallow(<DotNetExecute commands={['command1', 'command2']} component={mockComponent()} />)
+ ).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx
index a6c1d5c3dbf..e2cfce486d8 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx
@@ -19,10 +19,13 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import DotNetFramework from '../DotNetFramework';
-it('Should renders correctly', () => {
+it('should render correctly', () => {
expect(
- shallow(<DotNetFramework host="host" projectKey="projectKey" token="token" />)
+ shallow(
+ <DotNetFramework host="host" component={mockComponent({ key: 'projectKey' })} token="token" />
+ )
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx
index 1de261193b9..ecf1c268cee 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx
@@ -19,10 +19,13 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import DotNetCore from '../DotNetCore';
-it('Should renders correctly', () => {
+it('should render correctly', () => {
expect(
- shallow(<DotNetCore host="host" projectKey="projectKey" token="token" />)
+ shallow(
+ <DotNetCore host="host" component={mockComponent({ key: 'projectKey' })} token="token" />
+ )
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/ExecScanner-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/ExecScanner-test.tsx
index 02c3feefe19..9f9ccd1d23b 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/ExecScanner-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/ExecScanner-test.tsx
@@ -19,19 +19,26 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import { OSs } from '../../../types';
import ExecScanner, { ExecScannerProps } from '../ExecScanner';
-it.each([OSs.Linux, OSs.Windows, OSs.MacOS])('Shoud renders for %p correctly', os => {
+it.each([OSs.Linux, OSs.Windows, OSs.MacOS])('should render correctly for %p', os => {
expect(shallowRender({ os })).toMatchSnapshot();
});
-it('Should render for cfamily', () => {
+it('should render correctly for cfamily', () => {
expect(shallowRender({ cfamily: true })).toMatchSnapshot();
});
function shallowRender(props: Partial<ExecScannerProps> = {}) {
return shallow<ExecScannerProps>(
- <ExecScanner host="host" os={OSs.Linux} projectKey="projectKey" token="token" {...props} />
+ <ExecScanner
+ host="host"
+ os={OSs.Linux}
+ component={mockComponent({ key: 'projectKey' })}
+ token="token"
+ {...props}
+ />
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaGradle-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaGradle-test.tsx
index 917f279493b..e9f868da12a 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaGradle-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaGradle-test.tsx
@@ -19,10 +19,13 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import JavaGradle from '../JavaGradle';
it('renders correctly', () => {
expect(
- shallow(<JavaGradle host="host" projectKey="projectKey" token="token" />)
+ shallow(
+ <JavaGradle host="host" component={mockComponent({ key: 'projectKey' })} token="token" />
+ )
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaMaven-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaMaven-test.tsx
index eddbb1df1e8..054fa94df61 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaMaven-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/JavaMaven-test.tsx
@@ -19,10 +19,13 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import JavaMaven from '../JavaMaven';
it('renders correctly', () => {
expect(
- shallow(<JavaMaven host="host" projectKey="projectKey" token="token" />)
+ shallow(
+ <JavaMaven host="host" component={mockComponent({ key: 'projectKey' })} token="token" />
+ )
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/Other-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/Other-test.tsx
index 751a95f8cd5..db6f85490ed 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/Other-test.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/Other-test.tsx
@@ -19,6 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockComponent } from '../../../../../helpers/testMocks';
import { OSs } from '../../../types';
import Other, { OtherProps } from '../Other';
@@ -28,6 +29,12 @@ it('renders correctly', () => {
function shallowRender(props: Partial<OtherProps> = {}) {
return shallow<OtherProps>(
- <Other host="host" os={OSs.Linux} projectKey="projectKey" token="token" {...props} />
+ <Other
+ host="host"
+ os={OSs.Linux}
+ component={mockComponent({ key: 'projectKey' })}
+ token="token"
+ {...props}
+ />
);
}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap
index 2df0e23b2b8..c33c2b7b140 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap
@@ -2,17 +2,59 @@
exports[`renders correctly: .NET 1`] = `
<DotNet
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="HOST"
- projectKey="my-project"
token="myToken"
/>
`;
exports[`renders correctly: CFamily 1`] = `
<ClangGCCCustom
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="HOST"
os="linux"
- projectKey="my-project"
token="myToken"
/>
`;
@@ -21,25 +63,88 @@ exports[`renders correctly: Empty CFamily 1`] = `""`;
exports[`renders correctly: gradle 1`] = `
<JavaGradle
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="HOST"
- projectKey="my-project"
token="myToken"
/>
`;
exports[`renders correctly: maven 1`] = `
<JavaMaven
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="HOST"
- projectKey="my-project"
token="myToken"
/>
`;
exports[`renders correctly: other 1`] = `
<Other
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="HOST"
os="win"
- projectKey="my-project"
token="myToken"
/>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap
index 7539b8cf22d..b4cb5128d1b 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Shoud renders correctly 1`] = `
+exports[`should render correctly 1`] = `
<div>
<DownloadBuildWrapper
os="linux"
@@ -13,9 +13,30 @@ exports[`Shoud renders correctly 1`] = `
/>
<ExecScanner
cfamily={true}
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="host"
os="linux"
- projectKey="projectKey"
token="token"
/>
</div>
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap
index a322725aec2..b88033c45f5 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Should renders correctly 1`] = `
+exports[`should render correctly 1`] = `
<Fragment>
<RenderOptions
checked="dotnet_core"
@@ -16,8 +16,29 @@ exports[`Should renders correctly 1`] = `
titleLabelKey="onboarding.build.dotnet.variant"
/>
<DotNetCore
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="host"
- projectKey="projectKey"
token="token"
/>
</Fragment>
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap
index bc623435f01..7ff51cbcb67 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Should renders correctly 1`] = `
+exports[`should render correctly 1`] = `
<Fragment>
<h4
className="huge-spacer-top spacer-bottom"
@@ -40,5 +40,29 @@ exports[`Should renders correctly 1`] = `
}
/>
</p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "my-project",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</Fragment>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
index 986272b490d..13edb7d7370 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Should renders correctly 1`] = `
+exports[`should render correctly 1`] = `
<div>
<div>
<h4
@@ -39,6 +39,28 @@ exports[`Should renders correctly 1`] = `
"SonarScanner.MSBuild.exe end /d:sonar.login=\\"token\\"",
]
}
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
/>
</div>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap
index 5621eab6cad..73c108fd1a2 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Should renders correctly 1`] = `
+exports[`should render correctly 1`] = `
<div>
<h4
className="huge-spacer-top spacer-bottom"
@@ -29,6 +29,28 @@ exports[`Should renders correctly 1`] = `
"dotnet sonarscanner end /d:sonar.login=\\"token\\"",
]
}
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
/>
</div>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap
index 140fe68ea6a..b48bd7b66eb 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Shoud renders for "linux" correctly 1`] = `
+exports[`should render correctly for "linux" 1`] = `
<div>
<h4
className="huge-spacer-top spacer-bottom"
@@ -45,15 +45,34 @@ exports[`Shoud renders for "linux" correctly 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
-exports[`Shoud renders for "mac" correctly 1`] = `
+exports[`should render correctly for "mac" 1`] = `
<div>
<h4
className="huge-spacer-top spacer-bottom"
@@ -98,15 +117,34 @@ exports[`Shoud renders for "mac" correctly 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
-exports[`Shoud renders for "win" correctly 1`] = `
+exports[`should render correctly for "win" 1`] = `
<div>
<h4
className="huge-spacer-top spacer-bottom"
@@ -151,15 +189,34 @@ exports[`Shoud renders for "win" correctly 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
-exports[`Should render for cfamily 1`] = `
+exports[`should render correctly for cfamily 1`] = `
<div>
<h4
className="huge-spacer-top spacer-bottom"
@@ -204,10 +261,29 @@ exports[`Should render for cfamily 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap
index b93775bcc24..9737f0a58df 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap
@@ -76,10 +76,29 @@ exports[`renders correctly 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap
index 2482e1d3457..aafc6e3517e 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap
@@ -44,10 +44,29 @@ exports[`renders correctly 1`] = `
}
/>
</p>
- <p
- className="big-spacer-top markdown"
- >
- onboarding.analysis.auto_refresh_after_analysis
- </p>
+ <DoneNextSteps
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
+ />
</div>
`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap
index 2d3b3086434..bea3152d2d9 100644
--- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap
@@ -6,9 +6,30 @@ exports[`renders correctly 1`] = `
os="linux"
/>
<ExecScanner
+ component={
+ Object {
+ "breadcrumbs": Array [],
+ "key": "projectKey",
+ "name": "MyProject",
+ "qualifier": "TRK",
+ "qualityGate": Object {
+ "isDefault": true,
+ "key": "30",
+ "name": "Sonar way",
+ },
+ "qualityProfiles": Array [
+ Object {
+ "deleted": false,
+ "key": "my-qp",
+ "language": "ts",
+ "name": "Sonar way",
+ },
+ ],
+ "tags": Array [],
+ }
+ }
host="host"
os="linux"
- projectKey="projectKey"
token="token"
/>
</div>