diff options
author | Jeremy Davis <jeremy.davis@sonarsource.com> | 2020-03-06 14:40:07 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-03-09 20:04:22 +0000 |
commit | baa8e99e2e78f026c8389352e8a1be8b2fd574d6 (patch) | |
tree | f388d41f95bfa2d6bd4e08fad9a4670391a38d58 /server | |
parent | d4723451db83f291826b2f09f3f16f9cbc64d411 (diff) | |
download | sonarqube-baa8e99e2e78f026c8389352e8a1be8b2fd574d6.tar.gz sonarqube-baa8e99e2e78f026c8389352e8a1be8b2fd574d6.zip |
SONAR-13166 Fix tooltip on hotspot status
Diffstat (limited to 'server')
2 files changed, 15 insertions, 131 deletions
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx index 097bda68eee..eff11aca461 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx @@ -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 diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap index 7438207a07c..c16aed0e979 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap @@ -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> `; |