aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-10-20 15:26:27 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-10-23 08:57:31 +0200
commitb5ced5bc4727e6a4757c51b447b0979096a0f7b9 (patch)
tree3101e362423df026a9bd337131e4193ec7d46ec4 /server/sonar-web/src/main/js
parent8798cc1df59ef804c17d9e77f63c00c14ebcbddc (diff)
downloadsonarqube-b5ced5bc4727e6a4757c51b447b0979096a0f7b9.tar.gz
sonarqube-b5ced5bc4727e6a4757c51b447b0979096a0f7b9.zip
fix file permalink with branch
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/app/components/ComponentContainer.tsx5
-rw-r--r--server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx4
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();
});
});