diff --git a/public/app/core/components/sidemenu/SignIn.test.tsx b/public/app/core/components/sidemenu/SignIn.test.tsx
index 4aa50de5fc4..907b801f301 100644
--- a/public/app/core/components/sidemenu/SignIn.test.tsx
+++ b/public/app/core/components/sidemenu/SignIn.test.tsx
@@ -2,13 +2,9 @@ import React from 'react';
import { shallow } from 'enzyme';
import { SignIn } from './SignIn';
-jest.mock('../../config', () => ({
- appUrl: 'http://localhost:3000/',
-}));
-
describe('Render', () => {
it('should render component', () => {
- const wrapper = shallow();
+ const wrapper = shallow();
expect(wrapper).toMatchSnapshot();
});
diff --git a/public/app/core/components/sidemenu/SignIn.tsx b/public/app/core/components/sidemenu/SignIn.tsx
index 817f0433554..5400c653417 100644
--- a/public/app/core/components/sidemenu/SignIn.tsx
+++ b/public/app/core/components/sidemenu/SignIn.tsx
@@ -1,18 +1,13 @@
import React, { FC } from 'react';
-import config from 'app/core/config';
+
import { connectWithStore } from 'app/core/utils/connectWithReduxStore';
import { StoreState } from 'app/types';
import { Icon } from '@grafana/ui';
-
-const getForcedLoginUrl = (url: string) => {
- const urlObj = new URL(url, config.appUrl);
- let params = urlObj.searchParams;
- params.set('forceLogin', 'true');
- return urlObj.toString();
-};
+import { getForcedLoginUrl } from './utils';
export const SignIn: FC = ({ url }) => {
const forcedLoginUrl = getForcedLoginUrl(url);
+
return (