aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2019-03-13 10:59:27 +0100
committerSonarTech <sonartech@sonarsource.com>2019-03-18 20:20:58 +0100
commitd6349a677ee3d656260ad75b6ef5a3f19d74c2bf (patch)
treecb469589ab8555a7df6255c746844484120f639d /server
parentd931921441c807c831ac57d0dcfa96ba8f40dae1 (diff)
downloadsonarqube-d6349a677ee3d656260ad75b6ef5a3f19d74c2bf.tar.gz
sonarqube-d6349a677ee3d656260ad75b6ef5a3f19d74c2bf.zip
SONARCLOUD-456 Update screenshot for marketing page
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/public/images/sonarcloud/branch-02.pngbin19538 -> 82703 bytes
-rw-r--r--server/sonar-web/public/images/sonarcloud/branch-02@2x.pngbin46527 -> 248036 bytes
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx37
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/BranchAnalysis-test.tsx.snap7
5 files changed, 45 insertions, 1 deletions
diff --git a/server/sonar-web/public/images/sonarcloud/branch-02.png b/server/sonar-web/public/images/sonarcloud/branch-02.png
index 93796eefc21..90712f9994d 100644
--- a/server/sonar-web/public/images/sonarcloud/branch-02.png
+++ b/server/sonar-web/public/images/sonarcloud/branch-02.png
Binary files differ
diff --git a/server/sonar-web/public/images/sonarcloud/branch-02@2x.png b/server/sonar-web/public/images/sonarcloud/branch-02@2x.png
index 0073f2e2264..276bafb1cf7 100644
--- a/server/sonar-web/public/images/sonarcloud/branch-02@2x.png
+++ b/server/sonar-web/public/images/sonarcloud/branch-02@2x.png
Binary files differ
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
index 1681713b094..e0f5e54902a 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
@@ -90,7 +90,7 @@ export default function BranchAnalysis() {
<img
alt=""
className="sc-branch-feature-left flex-0"
- height="390"
+ height="432"
src={`${getBaseUrl()}/images/sonarcloud/branch-02.png`}
srcSet={`${getBaseUrl()}/images/sonarcloud/branch-02.png 1x, ${getBaseUrl()}/images/sonarcloud/branch-02@2x.png 2x`}
width="471"
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx
new file mode 100644
index 00000000000..1d1795354fc
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx
@@ -0,0 +1,37 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 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 { shallow } from 'enzyme';
+import BranchAnalysis from '../BranchAnalysis';
+import { waitAndUpdate } from '../../../../helpers/testUtils';
+
+// necessary to make the test run
+jest.mock('Docs/EmbedDocsSuggestions.json', () => {}, { virtual: true });
+
+beforeEach(() => {
+ jest.clearAllMocks();
+});
+
+it('should render', async () => {
+ const wrapper = shallow(<BranchAnalysis />);
+ await waitAndUpdate(wrapper);
+
+ expect(wrapper).toMatchSnapshot();
+});
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/BranchAnalysis-test.tsx.snap b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/BranchAnalysis-test.tsx.snap
new file mode 100644
index 00000000000..61dfa5de642
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/BranchAnalysis-test.tsx.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render 1`] = `
+<withRouter(Connect(SQPageContainer))>
+ <Component />
+</withRouter(Connect(SQPageContainer))>
+`;