diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2022-07-11 17:18:20 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-07-18 20:03:26 +0000 |
commit | 5d008ce289fc169c9e6cdd9f34cbac13dc79b426 (patch) | |
tree | d37a5aad2499628af0cd6e527982df15f3c9282b /server/sonar-web/src/main/js/apps/security-hotspots | |
parent | 30c1d8d6a91d9e18633314ee2cb636bd70811d10 (diff) | |
download | sonarqube-5d008ce289fc169c9e6cdd9f34cbac13dc79b426.tar.gz sonarqube-5d008ce289fc169c9e6cdd9f34cbac13dc79b426.zip |
[NO-JIRA] Rename RadioToggle to ButtonToggle
Diffstat (limited to 'server/sonar-web/src/main/js/apps/security-hotspots')
3 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx index 2f4ef10966d..d31590984bf 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; +import ButtonToggle from '../../../components/controls/ButtonToggle'; import HelpTooltip from '../../../components/controls/HelpTooltip'; -import RadioToggle from '../../../components/controls/RadioToggle'; import Select from '../../../components/controls/Select'; import Measure from '../../../components/measure/Measure'; import CoverageRating from '../../../components/ui/CoverageRating'; @@ -98,7 +98,7 @@ export function FilterBar(props: FilterBarProps) { <h3 className="huge-spacer-right">{translate('hotspot.filters.title')}</h3> {isLoggedIn(currentUser) && ( - <RadioToggle + <ButtonToggle className="huge-spacer-right" name="assignee-filter" onCheck={(value: AssigneeFilterOption) => diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx index 82aff8346de..7f7126af081 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import RadioToggle from '../../../../components/controls/RadioToggle'; +import ButtonToggle from '../../../../components/controls/ButtonToggle'; import Select from '../../../../components/controls/Select'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; @@ -72,7 +72,7 @@ it('should trigger onChange for self-assigned toggle', () => { const onChangeFilters = jest.fn(); const wrapper = shallowRender({ currentUser: mockLoggedInUser(), onChangeFilters }); - const { onCheck } = wrapper.find(RadioToggle).props(); + const { onCheck } = wrapper.find(ButtonToggle).props(); onCheck(AssigneeFilterOption.ALL); expect(onChangeFilters).toBeCalledWith({ assignedToMe: false }); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap index 9c037b787b2..ab5a9d2636c 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/FilterBar-test.tsx.snap @@ -157,7 +157,7 @@ exports[`should render correctly: logged-in 1`] = ` > hotspot.filters.title </h3> - <RadioToggle + <ButtonToggle className="huge-spacer-right" disabled={false} name="assignee-filter" @@ -289,7 +289,7 @@ exports[`should render correctly: non-project 1`] = ` > hotspot.filters.title </h3> - <RadioToggle + <ButtonToggle className="huge-spacer-right" disabled={false} name="assignee-filter" |