Skip to content

Commit 425ee05

Browse files
committed
npm run lint-branch-fix
1 parent 3a12012 commit 425ee05

7 files changed

Lines changed: 17 additions & 28 deletions

File tree

packages/components/src/internal/components/ontology/ConceptOverviewPanel.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('ConceptOverviewTooltip', () => {
112112
});
113113

114114
test('error', () => {
115-
const { container } = render(<ConceptOverviewTooltip error="test error" concept={TEST_CONCEPT} />);
115+
const { container } = render(<ConceptOverviewTooltip concept={TEST_CONCEPT} error="test error" />);
116116
expect(container.querySelector('[role="alert"]').textContent).toBe('test error');
117117
expect(container.querySelector('.overlay-trigger')).toBeNull();
118118
});

packages/components/src/internal/components/ontology/ConceptPathDisplay.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-cycle */
21
import React, { FC, memo, useCallback, useEffect, useState } from 'react';
32
import classNames from 'classnames';
43

@@ -10,10 +9,10 @@ import { PathModel } from './models';
109
import { fetchParentPaths } from './actions';
1110

1211
export interface ConceptPathDisplayProps {
13-
title?: string;
14-
path: PathModel;
1512
isSelected?: boolean;
1613
onClick?: (path: PathModel, isAlternatePath?: boolean) => void;
14+
path: PathModel;
15+
title?: string;
1716
}
1817

1918
export const ConceptPathDisplay: FC<ConceptPathDisplayProps> = memo(props => {

packages/components/src/internal/components/ontology/OntologyBrowserPanel.test.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ describe('OntologyBrowserPanelImpl', () => {
6969
});
7070

7171
test('ontology', () => {
72-
const { container } = render(
73-
<OntologyBrowserPanelImpl {...DEFAULT_IMPL_PROPS} ontology={TEST_ONTOLOGY} />
74-
);
72+
const { container } = render(<OntologyBrowserPanelImpl {...DEFAULT_IMPL_PROPS} ontology={TEST_ONTOLOGY} />);
7573
expect(container.querySelector('.ontology-browser-container')).not.toBeNull();
7674
expect(container.querySelector('.left-panel')).not.toBeNull();
7775
expect(container.querySelector('.right-panel')).not.toBeNull();
@@ -82,11 +80,7 @@ describe('OntologyBrowserPanelImpl', () => {
8280

8381
test('selectedConcept', () => {
8482
const { container } = render(
85-
<OntologyBrowserPanelImpl
86-
{...DEFAULT_IMPL_PROPS}
87-
ontology={TEST_ONTOLOGY}
88-
selectedConcept={TEST_CONCEPT}
89-
/>
83+
<OntologyBrowserPanelImpl {...DEFAULT_IMPL_PROPS} ontology={TEST_ONTOLOGY} selectedConcept={TEST_CONCEPT} />
9084
);
9185
expect(container.querySelector('.ontology-browser-container')).not.toBeNull();
9286
expect(container.querySelector('.left-panel')).not.toBeNull();
@@ -95,7 +89,7 @@ describe('OntologyBrowserPanelImpl', () => {
9589

9690
test('asPanel', () => {
9791
const { container } = render(
98-
<OntologyBrowserPanelImpl {...DEFAULT_IMPL_PROPS} ontology={TEST_ONTOLOGY} asPanel={true} />
92+
<OntologyBrowserPanelImpl {...DEFAULT_IMPL_PROPS} asPanel={true} ontology={TEST_ONTOLOGY} />
9993
);
10094
expect(container.querySelector('.ontology-browser-container')).not.toBeNull();
10195
expect(container.querySelector('.panel-body')).not.toBeNull();

packages/components/src/internal/components/ontology/OntologyLookupOptions.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('OntologyLookupOptions', () => {
9797
const field = DomainField.create({});
9898
const domainFields = List.of(field);
9999
const { container } = render(
100-
<OntologyLookupOptions {...getDefaultProps()} field={field} domainFields={domainFields} />
100+
<OntologyLookupOptions {...getDefaultProps()} domainFields={domainFields} field={field} />
101101
);
102102
await validateSelects(container, false, 1, 1, [null], [null]);
103103
expect(container.querySelector('.domain-field-section-heading')).not.toBeNull();
@@ -107,7 +107,7 @@ describe('OntologyLookupOptions', () => {
107107
test('with additional fields and ontology field props', async () => {
108108
const domainFields = List.of(field1, field2, field3, field4, field5, field6);
109109
const { container } = render(
110-
<OntologyLookupOptions {...getDefaultProps()} field={field1} domainFields={domainFields} />
110+
<OntologyLookupOptions {...getDefaultProps()} domainFields={domainFields} field={field1} />
111111
);
112112
await validateSelects(container, false, 3, 3, [null, 'field2', 'field4'], [null, 'field3', 'field4']);
113113
});
@@ -117,8 +117,8 @@ describe('OntologyLookupOptions', () => {
117117
const { container } = render(
118118
<OntologyLookupOptions
119119
{...getDefaultProps()}
120-
field={field1}
121120
domainFields={domainFields}
121+
field={field1}
122122
lockType={DOMAIN_FIELD_FULLY_LOCKED}
123123
/>
124124
);

packages/components/src/internal/components/ontology/OntologySelectionPanel.test.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,20 @@ describe('OntologySelectionPanel', () => {
4141
});
4242

4343
test('with ontologies', () => {
44-
const { container } = render(
45-
<OntologySelectionPanelImpl {...DEFAULT_PROPS} ontologies={[new PathModel()]} />
46-
);
44+
const { container } = render(<OntologySelectionPanelImpl {...DEFAULT_PROPS} ontologies={[new PathModel()]} />);
4745
expect(container.querySelector('.fa-spinner')).toBeNull();
4846
expect(container.querySelector('.alert-warning')).toBeNull();
4947
});
5048

5149
test('asPanel', () => {
52-
const { container } = render(
53-
<OntologySelectionPanelImpl {...DEFAULT_PROPS} ontologies={[]} asPanel={true} />
54-
);
50+
const { container } = render(<OntologySelectionPanelImpl {...DEFAULT_PROPS} asPanel={true} ontologies={[]} />);
5551
expect(container.querySelector('.ontology-browser-container')).not.toBeNull();
5652
expect(container.querySelector('.panel-body')).not.toBeNull();
5753
});
5854

5955
test('error', () => {
6056
const { container } = render(
61-
<OntologySelectionPanelImpl {...DEFAULT_PROPS} ontologies={[]} error="test error" />
57+
<OntologySelectionPanelImpl {...DEFAULT_PROPS} error="test error" ontologies={[]} />
6258
);
6359
expect(container.querySelector('[role="alert"]')).not.toBeNull();
6460
expect(container.querySelector('[role="alert"]').textContent).toBe('test error');

packages/components/src/internal/components/ontology/OntologyTreePanel.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('FilterIcon', () => {
5252
test('node selected', () => {
5353
const testnode = { data: { code: 'test' } };
5454
const testFilters = new Map<string, PathModel>().set('test', new PathModel());
55-
const { container } = render(<FilterIcon node={testnode} filters={testFilters} />);
55+
const { container } = render(<FilterIcon filters={testFilters} node={testnode} />);
5656
const icon = container.querySelector('i');
5757
expect(icon.className).toBe('fa fa-filter selected');
5858
expect(icon.title).toBe('Remove filter');
@@ -61,7 +61,7 @@ describe('FilterIcon', () => {
6161
test('node not selected', () => {
6262
const testnode = { data: { code: 'test' } };
6363
const testFilters = new Map<string, PathModel>().set('nope', new PathModel());
64-
const { container } = render(<FilterIcon node={testnode} filters={testFilters} />);
64+
const { container } = render(<FilterIcon filters={testFilters} node={testnode} />);
6565
const icon = container.querySelector('i');
6666
expect(icon.className).toBe('fa fa-filter');
6767
expect(icon.title).toBe('Add filter');

packages/components/src/internal/components/user/UserDeleteConfirmModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export class UserDeleteConfirmModal extends React.Component<Props, State> {
5050

5151
return (
5252
<Modal
53-
title={'Delete ' + Utils.pluralBasic(userCount, 'User') + '?'}
54-
onConfirm={this.onConfirm}
55-
onCancel={onCancel}
5653
confirmClass="btn-danger"
5754
confirmText="Yes, Permanently Delete"
5855
isConfirming={submitting}
56+
onCancel={onCancel}
57+
onConfirm={this.onConfirm}
58+
title={'Delete ' + Utils.pluralBasic(userCount, 'User') + '?'}
5959
>
6060
<p>
6161
Generally, <b>deactivation of a user is recommended</b>. Deactivated users may not login, but their

0 commit comments

Comments
 (0)