diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2022-08-24 17:40:37 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-08-29 20:02:53 +0000 |
commit | c757692a0a8d02998bfd8839c2612e17011013a7 (patch) | |
tree | fe7bfbb93c5e2de91034487f92bdfecce8c9ae2f /server/sonar-web/src/main/js/components/common | |
parent | 479f33aad4fdd0e294be2444fd95c8931768b036 (diff) | |
download | sonarqube-c757692a0a8d02998bfd8839c2612e17011013a7.tar.gz sonarqube-c757692a0a8d02998bfd8839c2612e17011013a7.zip |
SONAR-16725 [891882] An icon lacks 3 to 1 contrast ratio
Diffstat (limited to 'server/sonar-web/src/main/js/components/common')
5 files changed, 12 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx index f0a776dcf43..c0fd6951d4d 100644 --- a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx @@ -145,7 +145,6 @@ export class AnalysisWarningsModal extends React.PureComponent<Props, State> { {dismissable && currentUser.isLoggedIn && ( <div className="spacer-top display-flex-inline"> <ButtonLink - className="link-base-color" disabled={Boolean(dismissedWarning)} onClick={() => { this.handleDismissMessage(key); diff --git a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx index 3e582b2aed0..b1e6b85ee7f 100644 --- a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx +++ b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx @@ -66,7 +66,7 @@ export default function DocumentationTooltip(props: DocumentationTooltipProps) { </Link> ) : ( <Link - className="display-inline-flex-center link-with-icon" + className="display-inline-flex-center" to={href} rel="noopener noreferrer" target="_blank"> diff --git a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx index 68788eb7fae..bd8f9d4a99a 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx @@ -22,7 +22,8 @@ import * as React from 'react'; import { dismissAnalysisWarning, getTask } from '../../../api/ce'; import { mockTaskWarning } from '../../../helpers/mocks/tasks'; import { mockCurrentUser } from '../../../helpers/testMocks'; -import { mockEvent, waitAndUpdate } from '../../../helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; +import { ButtonLink } from '../../controls/buttons'; import { AnalysisWarningsModal } from '../AnalysisWarningsModal'; jest.mock('../../../api/ce', () => ({ @@ -67,11 +68,14 @@ it('should correctly handle dismissing warnings', async () => { warnings: [mockTaskWarning({ key: 'bar', dismissable: true })] }); - const click = wrapper.find('ButtonLink.link-base-color').props().onClick; + const { onClick } = wrapper + .find(ButtonLink) + .at(0) + .props(); - expect(click).toBeDefined(); - - click!(mockEvent()); + if (onClick) { + onClick(); + } await waitAndUpdate(wrapper); diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/AnalysisWarningsModal-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/AnalysisWarningsModal-test.tsx.snap index b703954b0ea..7b9218712f4 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/AnalysisWarningsModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/AnalysisWarningsModal-test.tsx.snap @@ -254,7 +254,6 @@ exports[`should render correctly: with dismissable warnings 1`] = ` className="spacer-top display-flex-inline" > <ButtonLink - className="link-base-color" disabled={false} onClick={[Function]} > diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DocumentationTooltip-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DocumentationTooltip-test.tsx.snap index 949ca3317f0..5c6a804f4e0 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DocumentationTooltip-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DocumentationTooltip-test.tsx.snap @@ -78,7 +78,7 @@ exports[`renders correctly: with links 1`] = ` className="little-spacer-bottom" > <Link - className="display-inline-flex-center link-with-icon" + className="display-inline-flex-center" rel="noopener noreferrer" target="_blank" to="http://link.tosome.place" @@ -97,7 +97,7 @@ exports[`renders correctly: with links 1`] = ` className="little-spacer-bottom" > <Link - className="display-inline-flex-center link-with-icon" + className="display-inline-flex-center" rel="noopener noreferrer" target="_blank" to="/documentation/guide" |