diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2020-02-11 11:32:37 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2020-02-21 20:46:15 +0100 |
commit | ec624ec45e1658b2c751422402175b63aaf30589 (patch) | |
tree | 3707f03289f17ca3b4d01f513ddcfd40214507d0 /server/sonar-web/src/main/js/apps/web-api | |
parent | 018153c8ed55fc3440d3f23bcd914458f26cd3e1 (diff) | |
download | sonarqube-ec624ec45e1658b2c751422402175b63aaf30589.tar.gz sonarqube-ec624ec45e1658b2c751422402175b63aaf30589.zip |
SONAR-12467 Improve back to rule list link
Diffstat (limited to 'server/sonar-web/src/main/js/apps/web-api')
-rw-r--r-- | server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx index a7a84bbc2f4..0083789b943 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx @@ -25,6 +25,8 @@ import { fetchWebApi } from '../../../../api/web-api'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; import { WebApiApp } from '../WebApiApp'; +jest.mock('../../../../components/common/ScreenPositionHelper'); + jest.mock('../../../../api/web-api', () => ({ fetchWebApi: jest.fn().mockResolvedValue([ { @@ -42,17 +44,6 @@ jest.mock('sonar-ui-common/helpers/pages', () => ({ removeSideBarClass: jest.fn() })); -jest.mock('../../../../components/common/ScreenPositionHelper', () => ({ - default: class ScreenPositionHelper extends React.Component<{ - children: (pos: { top: number }) => React.ReactNode; - }> { - static displayName = 'ScreenPositionHelper'; - render() { - return this.props.children({ top: 0 }); - } - } -})); - it('should render correctly', async () => { (global as any).scrollTo = jest.fn(); |