diff options
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(); }); }); |