]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13166 Fix tooltip on hotspot status
authorJeremy Davis <jeremy.davis@sonarsource.com>
Fri, 6 Mar 2020 13:40:07 +0000 (14:40 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 9 Mar 2020 20:04:22 +0000 (20:04 +0000)
server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap

index 097bda68eee9168ff61aaa5f3abc0b48b5920a12..eff11aca4617b9cc09dda33b4625f53ff498bc9e 100644 (file)
@@ -95,7 +95,7 @@ export function Status(props: StatusProps) {
     <div className="dropdown">
       {readonly ? (
         <Tooltip overlay={translate('hotspots.status.cannot_change_status')} placement="bottom">
-          {actionableTrigger}
+          {trigger}
         </Tooltip>
       ) : (
         actionableTrigger
index 7438207a07cca25f6b8c6a6dbce76f76478007a4..c16aed0e979087fc4746e498f0e0cd3be36223d3 100644 (file)
@@ -297,140 +297,24 @@ exports[`should render correctly: readonly 1`] = `
     overlay="hotspots.status.cannot_change_status"
     placement="bottom"
   >
-    <Toggler
-      closeOnClickOutside={true}
-      closeOnEscape={true}
-      onRequestClose={[Function]}
-      open={false}
-      overlay={
-        <DropdownOverlay
-          noPadding={true}
-          placement="bottom"
-        >
-          <StatusSelection
-            hotspot={
-              Object {
-                "assignee": "assignee",
-                "assigneeUser": Object {
-                  "active": true,
-                  "local": true,
-                  "login": "assignee",
-                  "name": "John Doe",
-                },
-                "author": "author",
-                "authorUser": Object {
-                  "active": true,
-                  "local": true,
-                  "login": "author",
-                  "name": "John Doe",
-                },
-                "canChangeStatus": false,
-                "changelog": Array [],
-                "comment": Array [],
-                "component": Object {
-                  "breadcrumbs": Array [],
-                  "key": "my-project",
-                  "name": "MyProject",
-                  "organization": "foo",
-                  "qualifier": "FIL",
-                  "qualityGate": Object {
-                    "isDefault": true,
-                    "key": "30",
-                    "name": "Sonar way",
-                  },
-                  "qualityProfiles": Array [
-                    Object {
-                      "deleted": false,
-                      "key": "my-qp",
-                      "language": "ts",
-                      "name": "Sonar way",
-                    },
-                  ],
-                  "tags": Array [],
-                },
-                "creationDate": "2013-05-13T17:55:41+0200",
-                "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
-                "line": 142,
-                "message": "'3' is a magic number.",
-                "project": Object {
-                  "breadcrumbs": Array [],
-                  "key": "my-project",
-                  "name": "MyProject",
-                  "organization": "foo",
-                  "qualifier": "TRK",
-                  "qualityGate": Object {
-                    "isDefault": true,
-                    "key": "30",
-                    "name": "Sonar way",
-                  },
-                  "qualityProfiles": Array [
-                    Object {
-                      "deleted": false,
-                      "key": "my-qp",
-                      "language": "ts",
-                      "name": "Sonar way",
-                    },
-                  ],
-                  "tags": Array [],
-                },
-                "resolution": "FIXED",
-                "rule": Object {
-                  "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
-                  "key": "squid:S2077",
-                  "name": "That rule",
-                  "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
-                  "securityCategory": "sql-injection",
-                  "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
-                  "vulnerabilityProbability": "HIGH",
-                },
-                "status": "REVIEWED",
-                "textRange": Object {
-                  "endLine": 142,
-                  "endOffset": 83,
-                  "startLine": 142,
-                  "startOffset": 26,
-                },
-                "updateDate": "2013-05-13T17:55:42+0200",
-                "users": Array [
-                  Object {
-                    "active": true,
-                    "local": true,
-                    "login": "assignee",
-                    "name": "John Doe",
-                  },
-                  Object {
-                    "active": true,
-                    "local": true,
-                    "login": "author",
-                    "name": "John Doe",
-                  },
-                ],
-              }
-            }
-            onStatusOptionChange={[Function]}
-          />
-        </DropdownOverlay>
-      }
+    <div
+      aria-expanded={false}
+      aria-haspopup={true}
+      className="padded bordered display-flex-column display-flex-justify-center readonly"
+      id="status-trigger"
+      onClick={[Function]}
+      role="button"
+      tabIndex={0}
     >
       <div
-        aria-expanded={false}
-        aria-haspopup={true}
-        className="padded bordered display-flex-column display-flex-justify-center readonly"
-        id="status-trigger"
-        onClick={[Function]}
-        role="button"
-        tabIndex={0}
+        className="display-flex-center display-flex-space-between"
       >
-        <div
-          className="display-flex-center display-flex-space-between"
-        >
-          <StatusDescription
-            showTitle={true}
-            statusOption="FIXED"
-          />
-        </div>
+        <StatusDescription
+          showTitle={true}
+          statusOption="FIXED"
+        />
       </div>
-    </Toggler>
+    </div>
   </Tooltip>
 </div>
 `;