Skip to content

Commit

Permalink
[Feat]Support Zoom to layer in layer panel, adaptive testing
Browse files Browse the repository at this point in the history
Signed-off-by: liuwo <18484922722@qq.com>
  • Loading branch information
liuwo committed Jan 30, 2024
1 parent 97ef605 commit f41a21f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions test/browser/components/side-panel/layer-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import cloneDeep from 'lodash.clonedeep';
import {fireEvent, screen} from '@testing-library/react';
import {dataTestIds} from '@kepler.gl/constants';
import {appInjector, LayerListFactory} from '@kepler.gl/components';
import {VisStateActions, UIStateActions, addDataToMap, keplerGlInit} from '@kepler.gl/actions';
import {VisStateActions, UIStateActions,MapStateActions, addDataToMap, keplerGlInit} from '@kepler.gl/actions';
import {processCsvData} from '@kepler.gl/processors';
import {keplerGlReducerCore as keplerGlReducer} from '@kepler.gl/reducers';

Expand Down Expand Up @@ -86,7 +86,8 @@ const defaultProps = {
layerOrder: StateWMultiH3Layers.visState.layerOrder,
layers: StateWMultiH3Layers.visState.layers,
uiStateActions: UIStateActions,
visStateActions: VisStateActions
visStateActions: VisStateActions,
mapStateActions: MapStateActions
};

// jest.mock('@kepler.gl/actions');
Expand Down
3 changes: 2 additions & 1 deletion test/browser/components/side-panel/layer-manager-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {

import {mountWithTheme, IntlWrapper} from 'test/helpers/component-utils';

import {VisStateActions, UIStateActions} from '@kepler.gl/actions';
import {VisStateActions, UIStateActions, MapStateActions} from '@kepler.gl/actions';

import {StateWMultiH3Layers} from 'test/helpers/mock-state';

Expand Down Expand Up @@ -52,6 +52,7 @@ const defaultProps = {
layerPanelListView: 'list',
uiStateActions: UIStateActions,
visStateActions: VisStateActions,
mapStateActions: MapStateActions,
layerBlending: 'normal',
overlayBlending: 'normal'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const defaultProps = {
onToggleVisibility: nop,
onUpdateLayerLabel: nop,
onToggleEnableConfig: nop,
onRemoveLayer: nop
onRemoveLayer: nop,
onZoomToLayer: nop,
};

test('Components -> LayerPanelHeader.mount -> no prop', t => {
Expand Down
3 changes: 2 additions & 1 deletion test/browser/components/side-panel/side-panel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
appInjector
} from '@kepler.gl/components';

import {VisStateActions, MapStyleActions, UIStateActions} from '@kepler.gl/actions';
import {VisStateActions, MapStyleActions, UIStateActions, MapStateActions} from '@kepler.gl/actions';

import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';

Expand Down Expand Up @@ -58,6 +58,7 @@ const defaultProps = {
width: 300,
uiStateActions: UIStateActions,
visStateActions: VisStateActions,
mapStateActions: MapStateActions,
mapStyleActions: MapStyleActions,
availableProviders: {}
};
Expand Down

0 comments on commit f41a21f

Please sign in to comment.