aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author7PH <benjamin.raymond@sonarsource.com>2023-04-05 10:10:41 +0200
committersonartech <sonartech@sonarsource.com>2023-04-11 20:03:15 +0000
commitf2d089d0dcaab91f93f6a74ab7fd2d6bab0757e4 (patch)
treec310563843575a251442dcbadf0a381dc9c55c4b
parent62bf759971eb111647a2d2c963161ed51a0ee825 (diff)
downloadsonarqube-f2d089d0dcaab91f93f6a74ab7fd2d6bab0757e4.tar.gz
sonarqube-f2d089d0dcaab91f93f6a74ab7fd2d6bab0757e4.zip
SONAR-18960 Rework it-license selenium tests
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/AnalysisErrorModal.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/AnalysisWarningsModal-test.tsx.snap20
3 files changed, 12 insertions, 20 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisErrorModal.tsx b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisErrorModal.tsx
index 46dc0f75861..bd368784421 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisErrorModal.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisErrorModal.tsx
@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { ButtonLink } from '../../../../components/controls/buttons';
import Modal from '../../../../components/controls/Modal';
+import { ResetButtonLink } from '../../../../components/controls/buttons';
import { hasMessage, translate } from '../../../../helpers/l10n';
import { Task } from '../../../../types/tasks';
import { Component } from '../../../../types/types';
@@ -62,9 +62,7 @@ export function AnalysisErrorModal(props: Props) {
</div>
<footer className="modal-foot">
- <ButtonLink className="js-modal-close" onClick={props.onClose}>
- {translate('close')}
- </ButtonLink>
+ <ResetButtonLink onClick={props.onClose}>{translate('close')}</ResetButtonLink>
</footer>
</Modal>
);
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 b3400a47a13..78759159f66 100644
--- a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx
+++ b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx
@@ -20,8 +20,8 @@
import * as React from 'react';
import { dismissAnalysisWarning, getTask } from '../../api/ce';
import withCurrentUserContext from '../../app/components/current-user/withCurrentUserContext';
-import { ButtonLink } from '../../components/controls/buttons';
import Modal from '../../components/controls/Modal';
+import { ButtonLink, ResetButtonLink } from '../../components/controls/buttons';
import WarningIcon from '../../components/icons/WarningIcon';
import DeferredSpinner from '../../components/ui/DeferredSpinner';
import { translate } from '../../helpers/l10n';
@@ -162,9 +162,7 @@ export class AnalysisWarningsModal extends React.PureComponent<Props, State> {
</div>
<footer className="modal-foot">
- <ButtonLink className="js-modal-close" onClick={this.props.onClose}>
- {translate('close')}
- </ButtonLink>
+ <ResetButtonLink onClick={this.props.onClose}>{translate('close')}</ResetButtonLink>
</footer>
</Modal>
);
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 2f0e5304c2f..664b51a100b 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
@@ -82,12 +82,11 @@ secondline
<footer
className="modal-foot"
>
- <ButtonLink
- className="js-modal-close"
+ <ResetButtonLink
onClick={[MockFunction]}
>
close
- </ButtonLink>
+ </ResetButtonLink>
</footer>
</Modal>
`;
@@ -153,12 +152,11 @@ exports[`should render correctly: default 1`] = `
<footer
className="modal-foot"
>
- <ButtonLink
- className="js-modal-close"
+ <ResetButtonLink
onClick={[MockFunction]}
>
close
- </ButtonLink>
+ </ResetButtonLink>
</footer>
</Modal>
`;
@@ -205,12 +203,11 @@ exports[`should render correctly: do not show dismissable links for anonymous 1`
<footer
className="modal-foot"
>
- <ButtonLink
- className="js-modal-close"
+ <ResetButtonLink
onClick={[MockFunction]}
>
close
- </ButtonLink>
+ </ResetButtonLink>
</footer>
</Modal>
`;
@@ -267,12 +264,11 @@ exports[`should render correctly: with dismissable warnings 1`] = `
<footer
className="modal-foot"
>
- <ButtonLink
- className="js-modal-close"
+ <ResetButtonLink
onClick={[MockFunction]}
>
close
- </ButtonLink>
+ </ResetButtonLink>
</footer>
</Modal>
`;