diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2022-04-07 20:10:48 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-04-08 20:02:59 +0000 |
commit | 426062571e84035f9ff66f4e53bba71837c61921 (patch) | |
tree | 6688c82f876789293b752d8519ac152ff1cb83ad /server/sonar-web/src/main/js/apps/quality-gates | |
parent | 8552fdb1d725753b4c4128ef81771db528d41c49 (diff) | |
download | sonarqube-426062571e84035f9ff66f4e53bba71837c61921.tar.gz sonarqube-426062571e84035f9ff66f4e53bba71837c61921.zip |
[NO-JIRA] Fix eslint issues
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates')
5 files changed, 2 insertions, 71 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx index 81bb2ec4ad0..2a2a7160b2c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx @@ -111,7 +111,7 @@ export default class QualityGatePermissionsAddModal extends React.Component<Prop render() { const { submitting } = this.props; - const { loading, query = '', searchResults, selection } = this.state; + const { loading, searchResults, selection } = this.state; return ( <QualityGatePermissionsAddModalRenderer @@ -120,7 +120,6 @@ export default class QualityGatePermissionsAddModal extends React.Component<Prop onInputChange={this.handleInputChange} onSelection={this.handleSelection} onSubmit={this.handleSubmit} - query={query} searchResults={searchResults} selection={selection} submitting={submitting} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx index 47c6190c801..f848fae6065 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx @@ -36,7 +36,6 @@ export interface QualityGatePermissionsAddModalRendererProps { onSelection: (selection: Option) => void; submitting: boolean; loading: boolean; - query: string; searchResults: Array<UserBase | Group>; selection?: UserBase | Group; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGatePermissionsAddModalRenderer-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGatePermissionsAddModalRenderer-test.tsx index da50d58ab68..4d2a5f04336 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGatePermissionsAddModalRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGatePermissionsAddModalRenderer-test.tsx @@ -27,13 +27,12 @@ import QualityGatePermissionsAddModalRenderer, { it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot('default'); - expect(shallowRender({ query: 'a' })).toMatchSnapshot('short query'); expect(shallowRender({ selection: mockUserBase() })).toMatchSnapshot('selection'); expect(shallowRender({ selection: mockUserBase(), submitting: true })).toMatchSnapshot( 'submitting' ); expect( - shallowRender({ query: 'ab', searchResults: [mockUserBase(), { name: 'group name' }] }) + shallowRender({ searchResults: [mockUserBase(), { name: 'group name' }] }) ).toMatchSnapshot('query and results'); }); @@ -52,7 +51,6 @@ function shallowRender(overrides: Partial<QualityGatePermissionsAddModalRenderer onInputChange={jest.fn()} onSelection={jest.fn()} onSubmit={jest.fn()} - query="" searchResults={[]} submitting={false} {...overrides} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModal-test.tsx.snap index 360a11c6027..60b40cc6cca 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModal-test.tsx.snap @@ -7,7 +7,6 @@ exports[`should render correctly 1`] = ` onInputChange={[Function]} onSelection={[Function]} onSubmit={[Function]} - query="" searchResults={Array []} submitting={false} /> diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModalRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModalRenderer-test.tsx.snap index f11d813ff89..6feb60f1acc 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModalRenderer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModalRenderer-test.tsx.snap @@ -203,70 +203,6 @@ exports[`should render correctly: selection 1`] = ` </Modal> `; -exports[`should render correctly: short query 1`] = ` -<Modal - contentLabel="quality_gates.permissions.grant" - onRequestClose={[MockFunction]} -> - <header - className="modal-head" - > - <h2> - quality_gates.permissions.grant - </h2> - </header> - <form - onSubmit={[MockFunction]} - > - <div - className="modal-body" - > - <div - className="modal-field" - > - <label> - quality_gates.permissions.search - </label> - <Select - autoFocus={true} - className="Select-big" - components={ - Object { - "Control": [Function], - "Option": [Function], - "SingleValue": [Function], - } - } - filterOptions={[Function]} - isClearable={false} - isLoading={false} - isSearchable={true} - noOptionsMessage={[Function]} - onChange={[MockFunction]} - onInputChange={[MockFunction]} - options={Array []} - placeholder="" - /> - </div> - </div> - <footer - className="modal-foot" - > - <SubmitButton - disabled={true} - > - add_verb - </SubmitButton> - <ResetButtonLink - onClick={[MockFunction]} - > - cancel - </ResetButtonLink> - </footer> - </form> -</Modal> -`; - exports[`should render correctly: submitting 1`] = ` <Modal contentLabel="quality_gates.permissions.grant" |