From 53cacbcdf5d599c2970700152ec4fb947b084bde Mon Sep 17 00:00:00 2001 From: David Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com> Date: Fri, 9 Dec 2022 16:35:30 +0100 Subject: [PATCH] SONAR-17726 Remove the "reload" link on the Rules page (#7205) --- .../js/apps/coding-rules/components/App.tsx | 7 +--- .../coding-rules/components/PageActions.tsx | 8 ----- .../components/__tests__/PageActions-test.tsx | 3 +- .../__tests__/__snapshots__/App-test.tsx.snap | 7 +--- .../__snapshots__/PageActions-test.tsx.snap | 33 ------------------- 5 files changed, 3 insertions(+), 55 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx index 8b06ba939e5..e14c9daa657 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx @@ -624,12 +624,7 @@ export class App extends React.PureComponent { this.renderBulkButton() )} {!usingPermalink && ( - + )} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx index f2090308027..16847565f79 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx @@ -19,15 +19,11 @@ */ import * as React from 'react'; import PageCounter from '../../../components/common/PageCounter'; -import ReloadButton from '../../../components/controls/ReloadButton'; -import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip'; import { translate } from '../../../helpers/l10n'; import { Paging } from '../../../types/types'; export interface PageActionsProps { - loading: boolean; - onReload: () => void; paging?: Paging; selectedIndex?: number; } @@ -41,10 +37,6 @@ export default function PageActions(props: PageActionsProps) { upAndDownLabel={translate('coding_rules.to_select_rules')} /> - - - - {props.paging && ( { expect(shallowRender()).toMatchSnapshot('default'); - expect(shallowRender({ loading: true })).toMatchSnapshot('loading'); expect(shallowRender({ paging: { total: 100 } as Paging })).toMatchSnapshot('with paging'); }); function shallowRender(props: Partial = {}) { - return shallow(); + return shallow(); } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap index 8c93e7442c9..f90b687a909 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap @@ -252,8 +252,6 @@ exports[`should render correctly: loaded 1`] = ` total={0} />
- +
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/PageActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/PageActions-test.tsx.snap index b9407f80f4b..c8c2a7420a6 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/PageActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/PageActions-test.tsx.snap @@ -9,32 +9,6 @@ exports[`should render correctly: default 1`] = ` leftAndRightLabel="issues.to_navigate" upAndDownLabel="coding_rules.to_select_rules" /> - - - - -`; - -exports[`should render correctly: loading 1`] = ` -
- - - -
`; @@ -47,13 +21,6 @@ exports[`should render correctly: with paging 1`] = ` leftAndRightLabel="issues.to_navigate" upAndDownLabel="coding_rules.to_select_rules" /> - - -