]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15702 Fix component navigation routing issue
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Wed, 19 Jan 2022 12:27:07 +0000 (13:27 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 20 Jan 2022 20:02:44 +0000 (20:02 +0000)
server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/Menu-test.tsx.snap

index 04b9e65839a5a1d7e473c0ae3b950fab0687a283..11e68b702e1dfa3afe9e0d4d18aad26daa89ed0a 100644 (file)
@@ -223,7 +223,7 @@ export class Menu extends React.PureComponent<Props> {
   renderComponentMeasuresLink = () => {
     return this.renderMenuLink({
       label: translate('layout.measures'),
-      to: { pathname: 'component_measures' }
+      to: { pathname: '/component_measures' }
     });
   };
 
index 5125f5ead4ec73c0da2017f37eb7892ce752cfd5..53cd6c07654eef101a37bf8c8bdbb6717f2e51f4 100644 (file)
@@ -344,7 +344,7 @@ exports[`should work for a branch 1`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "branch": "release",
               "id": "foo",
@@ -628,7 +628,7 @@ exports[`should work for a branch 2`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "branch": "release",
               "id": "foo",
@@ -789,7 +789,7 @@ exports[`should work for all qualifiers 1`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
             },
@@ -996,7 +996,7 @@ exports[`should work for all qualifiers 2`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
             },
@@ -1105,7 +1105,7 @@ exports[`should work for all qualifiers 3`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
             },
@@ -1218,7 +1218,7 @@ exports[`should work for all qualifiers 4`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
             },
@@ -1394,7 +1394,7 @@ exports[`should work for pull requests 1`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
               "pullRequest": "1001",
@@ -1526,7 +1526,7 @@ exports[`should work for pull requests 2`] = `
         style={Object {}}
         to={
           Object {
-            "pathname": "component_measures",
+            "pathname": "/component_measures",
             "query": Object {
               "id": "foo",
               "pullRequest": "1001",