diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-20 15:26:27 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-23 08:57:31 +0200 |
commit | b5ced5bc4727e6a4757c51b447b0979096a0f7b9 (patch) | |
tree | 3101e362423df026a9bd337131e4193ec7d46ec4 /server/sonar-web/src/main | |
parent | 8798cc1df59ef804c17d9e77f63c00c14ebcbddc (diff) | |
download | sonarqube-b5ced5bc4727e6a4757c51b447b0979096a0f7b9.tar.gz sonarqube-b5ced5bc4727e6a4757c51b447b0979096a0f7b9.zip |
fix file permalink with branch
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/ComponentContainer.tsx | 5 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx index a20ec1d527c..b1b2ac07fad 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx @@ -89,7 +89,10 @@ export class ComponentContainer extends React.PureComponent<Props, State> { } }; - Promise.all([getComponentNavigation(id), getComponentData(id, branch)]).then(([nav, data]) => { + Promise.all([ + getComponentNavigation(id, branch), + getComponentData(id, branch) + ]).then(([nav, data]) => { const component = this.addQualifier({ ...nav, ...data }); if (this.props.organizationsEnabled) { diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx index cd5be6f916c..ed7838f8ea3 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx @@ -80,7 +80,7 @@ it("loads branches for module's project", () => { return doAsync().then(() => { expect(getBranches).toBeCalledWith('projectKey'); expect(getComponentData).toBeCalledWith('moduleKey', undefined); - expect(getComponentNavigation).toBeCalledWith('moduleKey'); + expect(getComponentNavigation).toBeCalledWith('moduleKey', undefined); }); }); @@ -102,7 +102,7 @@ it("doesn't load branches portfolio", () => { return doAsync().then(() => { expect(getBranches).not.toBeCalled(); expect(getComponentData).toBeCalledWith('portfolioKey', undefined); - expect(getComponentNavigation).toBeCalledWith('portfolioKey'); + expect(getComponentNavigation).toBeCalledWith('portfolioKey', undefined); expect(wrapper.find(Inner).exists()).toBeTruthy(); }); }); |