From 29a8e3d1195cb53c40edbc199582cbd82e196bb9 Mon Sep 17 00:00:00 2001 From: Richard Dinh Date: Tue, 19 Mar 2024 14:39:03 -0400 Subject: [PATCH] renaming lintin broken references --- src/components/ActionBar/ActionBar.spec.js | 4 ++-- .../Dialogs/DataExport/DataExport.spec.js | 4 ++-- src/components/Filters/Company.spec.js | 4 ++-- src/components/Filters/Issue.spec.js | 4 ++-- src/components/List/ListPanel/ListPanel.spec.js | 8 ++++---- src/components/Map/MapPanel.spec.js | 4 ++-- src/components/Print/PrintInfo.spec.js | 4 ++-- src/reducers/aggs/aggsSlice.spec.js | 16 ++++++++-------- src/reducers/trends/trendsSlice.spec.js | 4 ++-- src/reducers/view/viewSlice.spec.js | 2 +- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/components/ActionBar/ActionBar.spec.js b/src/components/ActionBar/ActionBar.spec.js index f64f4ba1a..5b4f9727e 100644 --- a/src/components/ActionBar/ActionBar.spec.js +++ b/src/components/ActionBar/ActionBar.spec.js @@ -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 { @@ -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 = { diff --git a/src/components/Dialogs/DataExport/DataExport.spec.js b/src/components/Dialogs/DataExport/DataExport.spec.js index e0b7af550..15696d27a 100644 --- a/src/components/Dialogs/DataExport/DataExport.spec.js +++ b/src/components/Dialogs/DataExport/DataExport.spec.js @@ -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'; @@ -22,7 +22,7 @@ describe('DataExport', () => { }; global.navigator.clipboard = mockClipboard; - merge(newAggsState, aggState); + merge(newAggsState, aggsState); merge(newQueryState, queryState); const data = { aggs: newAggsState, diff --git a/src/components/Filters/Company.spec.js b/src/components/Filters/Company.spec.js index cfa1edd41..d47be2268 100644 --- a/src/components/Filters/Company.spec.js +++ b/src/components/Filters/Company.spec.js @@ -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'; @@ -15,7 +15,7 @@ const fixture = [ ]; const renderComponent = (newAggsState, newQueryState) => { - merge(newAggsState, aggState); + merge(newAggsState, aggsState); merge(newQueryState, queryState); const data = { diff --git a/src/components/Filters/Issue.spec.js b/src/components/Filters/Issue.spec.js index 6576ef076..f06815c40 100644 --- a/src/components/Filters/Issue.spec.js +++ b/src/components/Filters/Issue.spec.js @@ -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'; @@ -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, diff --git a/src/components/List/ListPanel/ListPanel.spec.js b/src/components/List/ListPanel/ListPanel.spec.js index df59efad9..299ceac25 100644 --- a/src/components/List/ListPanel/ListPanel.spec.js +++ b/src/components/List/ListPanel/ListPanel.spec.js @@ -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'; @@ -20,7 +20,7 @@ describe('ListPanel', () => { newResultsState, newViewState, ) => { - merge(newAggsState, aggState); + merge(newAggsState, aggsState); merge(newQueryState, queryState); merge(newResultsState, resultsState); merge(newViewState, viewState); @@ -157,7 +157,7 @@ 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(); }); @@ -165,7 +165,7 @@ describe('ListPanel', () => { 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(); }); diff --git a/src/components/Map/MapPanel.spec.js b/src/components/Map/MapPanel.spec.js index e45d76606..8b5512652 100644 --- a/src/components/Map/MapPanel.spec.js +++ b/src/components/Map/MapPanel.spec.js @@ -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'; @@ -20,7 +20,7 @@ describe('MapPanel', () => { newQueryState, newViewState, ) => { - merge(newAggsState, aggState); + merge(newAggsState, aggsState); merge(newMapState, mapState); merge(newQueryState, queryState); merge(newViewState, viewState); diff --git a/src/components/Print/PrintInfo.spec.js b/src/components/Print/PrintInfo.spec.js index fa4046183..f144fd101 100644 --- a/src/components/Print/PrintInfo.spec.js +++ b/src/components/Print/PrintInfo.spec.js @@ -1,6 +1,6 @@ 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'; @@ -8,7 +8,7 @@ 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); diff --git a/src/reducers/aggs/aggsSlice.spec.js b/src/reducers/aggs/aggsSlice.spec.js index a2c6f35ce..0639058c8 100644 --- a/src/reducers/aggs/aggsSlice.spec.js +++ b/src/reducers/aggs/aggsSlice.spec.js @@ -1,6 +1,6 @@ import target, { aggregationsApiCalled, - aggState, + aggsState, aggregationsApiFailed, aggregationsReceived, } from './aggsSlice'; @@ -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', }); }); @@ -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), @@ -59,7 +59,7 @@ describe('reducer:aggs', () => { }, }; const expected = { - ...aggState, + ...aggsState, doc_count: 162576, company_response: [{ key: 'foo', doc_count: 99 }], total: 99, @@ -71,7 +71,7 @@ describe('reducer:aggs', () => { }; expect( - target({ ...aggState, doc_count: 100 }, aggregationsReceived(action)), + target({ ...aggsState, doc_count: 100 }, aggregationsReceived(action)), ).toEqual(expected); }); }); diff --git a/src/reducers/trends/trendsSlice.spec.js b/src/reducers/trends/trendsSlice.spec.js index a9c513ae2..3ae25f418 100644 --- a/src/reducers/trends/trendsSlice.spec.js +++ b/src/reducers/trends/trendsSlice.spec.js @@ -2,6 +2,8 @@ import trends, { chartTypeUpdated, dataLensChanged, dataSubLensChanged, + depthChanged, + depthReset, focusChanged, focusRemoved, getDefaultState, @@ -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; diff --git a/src/reducers/view/viewSlice.spec.js b/src/reducers/view/viewSlice.spec.js index b03669533..894b79a67 100644 --- a/src/reducers/view/viewSlice.spec.js +++ b/src/reducers/view/viewSlice.spec.js @@ -123,7 +123,7 @@ describe('reducer:View', () => { }); describe('Row Chart actions', () => { - let action, result; + let result; it('handles ROW_COLLAPSED actions', () => { const payload = 'foo';