From 41b935a39f1d3358f3baa9ff91231f9fa2571697 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Thu, 9 May 2019 14:36:39 +0200 Subject: SONAR-12055 Display administration navbar notification when restarting the server --- .../common/__tests__/RestartButton-test.tsx | 30 ++++++++++++++++++++++ .../__snapshots__/RestartButton-test.tsx.snap | 23 +++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx create mode 100644 server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap (limited to 'server/sonar-web/src/main/js/components/common/__tests__') diff --git a/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx new file mode 100644 index 00000000000..3aecf0ae55f --- /dev/null +++ b/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx @@ -0,0 +1,30 @@ +/* + * 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 RestartButton from '../RestartButton'; + +it('should render correctly', () => { + expect(shallowRender()).toMatchSnapshot(); +}); + +function shallowRender(props: Partial = {}) { + return shallow(); +} diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap new file mode 100644 index 00000000000..90940e63cbb --- /dev/null +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/RestartButton-test.tsx.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render correctly 1`] = ` + +

+ system.are_you_sure_to_restart +

+

+ system.forcing_shutdown_not_recommended +

+ + } + modalHeader="system.restart_server" + onConfirm={[Function]} +> + +
+`; -- cgit v1.2.3