From 6ef7ca151ecd602ca8e9cea21743a895a81e89ba Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Tue, 17 Aug 2021 15:50:55 +0200 Subject: SONAR-15297 Move sonar-ui-common code to sonar-web --- .../src/main/js/apps/tutorials/components/TutorialsApp.tsx | 2 +- .../js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx | 6 ++++-- server/sonar-web/src/main/js/apps/tutorials/routes.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/tutorials') diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx index 27dc42381ed..91793919adb 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import TutorialSelection from '../../../components/tutorials/TutorialSelection'; import { isLoggedIn } from '../../../helpers/users'; +import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; export interface TutorialsAppProps { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx index bab74dbd72b..1cb372e0c1c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx @@ -19,12 +19,14 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; import { mockProjectAzureBindingResponse } from '../../../../helpers/mocks/alm-settings'; import { mockComponent, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; +import handleRequiredAuthentication from '../../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { TutorialsApp, TutorialsAppProps } from '../TutorialsApp'; -jest.mock('sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); +jest.mock('../../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ + default: jest.fn() +})); it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/routes.ts b/server/sonar-web/src/main/js/apps/tutorials/routes.ts index 3c043682d37..4cb72f2c83d 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/routes.ts +++ b/server/sonar-web/src/main/js/apps/tutorials/routes.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { lazyLoadComponent } from 'sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; const routes = [ { -- cgit v1.2.3