Skip to content

Commit

Permalink
renaming lintin broken references
Browse files Browse the repository at this point in the history
  • Loading branch information
flacoman91 committed Mar 19, 2024
1 parent 0c35f5a commit 29a8e3d
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/components/ActionBar/ActionBar.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { ActionBar } from './ActionBar';
import { aggState } from '../../reducers/aggs/aggsSlice';
import { aggsState } from '../../reducers/aggs/aggsSlice';
import { queryState } from '../../reducers/query/querySlice';
import { merge } from '../../testUtils/functionHelpers';
import {
Expand All @@ -13,7 +13,7 @@ import * as utils from '../../utils';

describe('ActionBar', () => {
const renderComponent = (newAggsState, newQueryState) => {
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);

const data = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dialogs/DataExport/DataExport.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
fireEvent,
} from '../../../testUtils/test-utils';
import { merge } from '../../../testUtils/functionHelpers';
import { aggState } from '../../../reducers/aggs/aggsSlice';
import { aggsState } from '../../../reducers/aggs/aggsSlice';
import { queryState } from '../../../reducers/query/querySlice';
import * as viewActions from '../../../reducers/view/viewSlice';
import { MODAL_TYPE_EXPORT_CONFIRMATION } from '../../../constants';
Expand All @@ -22,7 +22,7 @@ describe('DataExport', () => {
};
global.navigator.clipboard = mockClipboard;

merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);
const data = {
aggs: newAggsState,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Filters/Company.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { merge } from '../../testUtils/functionHelpers';
import { aggState } from '../../reducers/aggs/aggsSlice';
import { aggsState } from '../../reducers/aggs/aggsSlice';
import { queryState } from '../../reducers/query/querySlice';
import { Company } from './Company';
import { testRender as render, screen } from '../../testUtils/test-utils';
Expand All @@ -15,7 +15,7 @@ const fixture = [
];

const renderComponent = (newAggsState, newQueryState) => {
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);

const data = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Filters/Issue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../../testUtils/test-utils';
import userEvent from '@testing-library/user-event';
import { merge } from '../../testUtils/functionHelpers';
import { aggState } from '../../reducers/aggs/aggsSlice';
import { aggsState } from '../../reducers/aggs/aggsSlice';
import { queryState } from '../../reducers/query/querySlice';
import { Issue } from './Issue';
import { listOfIssues } from '../../testUtils/aggsConstants';
Expand All @@ -17,7 +17,7 @@ describe('Issue', () => {
const renderComponent = () => {
const newAggsState = { issue: listOfIssues };
const newQueryState = { issue: ['Incorrect information on your report'] };
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);
const data = {
aggs: newAggsState,
Expand Down
8 changes: 4 additions & 4 deletions src/components/List/ListPanel/ListPanel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../../../testUtils/test-utils';
import { ListPanel } from './ListPanel';
import { merge } from '../../../testUtils/functionHelpers';
import { aggState } from '../../../reducers/aggs/aggsSlice';
import { aggsState } from '../../../reducers/aggs/aggsSlice';
import { queryState } from '../../../reducers/query/querySlice';
import { resultsState } from '../../../reducers/results/resultsSlice';
import { viewState } from '../../../reducers/view/viewSlice';
Expand All @@ -20,7 +20,7 @@ describe('ListPanel', () => {
newResultsState,
newViewState,
) => {
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);
merge(newResultsState, resultsState);
merge(newViewState, viewState);
Expand Down Expand Up @@ -157,15 +157,15 @@ describe('ListPanel', () => {
test('FilterPanel showed when width is 500', () => {
const newViewState = { width: 500 };

renderComponent(aggState, queryState, resultsState, newViewState);
renderComponent(aggsState, queryState, resultsState, newViewState);

expect(screen.getByText('Filter results by...')).toBeDefined();
});

test('FilterPanel not showed when width is 1000', () => {
const newViewState = { width: 1000 };

renderComponent(aggState, queryState, resultsState, newViewState);
renderComponent(aggsState, queryState, resultsState, newViewState);

expect(screen.queryByText('Filter results by...')).toBeNull();
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/Map/MapPanel.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { aggState } from '../../reducers/aggs/aggsSlice';
import { aggsState } from '../../reducers/aggs/aggsSlice';
import { mapState } from '../../reducers/map/mapSlice';
import { queryState } from '../../reducers/query/querySlice';
import { viewState } from '../../reducers/view/viewSlice';
Expand All @@ -20,7 +20,7 @@ describe('MapPanel', () => {
newQueryState,
newViewState,
) => {
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newMapState, mapState);
merge(newQueryState, queryState);
merge(newViewState, viewState);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Print/PrintInfo.spec.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { PrintInfo } from './PrintInfo';
import React from 'react';
import { aggState } from '../../reducers/aggs/aggsSlice';
import { aggsState } from '../../reducers/aggs/aggsSlice';
import { queryState } from '../../reducers/query/querySlice';
import { viewState } from '../../reducers/view/viewSlice';
import { merge } from '../../testUtils/functionHelpers';
import { testRender as render, screen } from '../../testUtils/test-utils';

describe('PrintInfo', () => {
const renderComponent = (newAggsState, newQueryState, newViewState) => {
merge(newAggsState, aggState);
merge(newAggsState, aggsState);
merge(newQueryState, queryState);
merge(newViewState, viewState);

Expand Down
16 changes: 8 additions & 8 deletions src/reducers/aggs/aggsSlice.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import target, {
aggregationsApiCalled,
aggState,
aggsState,
aggregationsApiFailed,
aggregationsReceived,
} from './aggsSlice';
Expand All @@ -9,14 +9,14 @@ describe('reducer:aggs', () => {
it('has a default state', () => {
const actual = target(undefined, {});

expect(actual).toEqual(aggState);
expect(actual).toEqual(aggsState);
});

it('handles aggregationsApiCalled actions', () => {
const action = 'foobar';

expect(target(aggState, aggregationsApiCalled(action))).toEqual({
...aggState,
expect(target(aggsState, aggregationsApiCalled(action))).toEqual({
...aggsState,
activeCall: 'foobar',
});
});
Expand All @@ -25,13 +25,13 @@ describe('reducer:aggs', () => {
const action = { message: 'error message', name: 'messageTypeName' };

const expected = {
...aggState,
...aggsState,
error: { message: 'error message', name: 'messageTypeName' },
};
expect(
target(
{
...aggState,
...aggsState,
error: '',
},
aggregationsApiFailed(action),
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('reducer:aggs', () => {
},
};
const expected = {
...aggState,
...aggsState,
doc_count: 162576,
company_response: [{ key: 'foo', doc_count: 99 }],
total: 99,
Expand All @@ -71,7 +71,7 @@ describe('reducer:aggs', () => {
};

expect(
target({ ...aggState, doc_count: 100 }, aggregationsReceived(action)),
target({ ...aggsState, doc_count: 100 }, aggregationsReceived(action)),
).toEqual(expected);
});
});
4 changes: 2 additions & 2 deletions src/reducers/trends/trendsSlice.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import trends, {
chartTypeUpdated,
dataLensChanged,
dataSubLensChanged,
depthChanged,
depthReset,
focusChanged,
focusRemoved,
getDefaultState,
Expand Down Expand Up @@ -42,8 +44,6 @@ import {
} from '../__fixtures__/trendsAggsMissingBuckets';
import * as types from '../../constants';

import { depthChanged, depthReset } from './trends';

describe('reducer:trends', () => {
let action, result, state;

Expand Down
2 changes: 1 addition & 1 deletion src/reducers/view/viewSlice.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('reducer:View', () => {
});

describe('Row Chart actions', () => {
let action, result;
let result;

it('handles ROW_COLLAPSED actions', () => {
const payload = 'foo';
Expand Down

0 comments on commit 29a8e3d

Please sign in to comment.