Skip to content

Commit

Permalink
test and import fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta committed Sep 12, 2022
1 parent 9cb4944 commit 5a16901
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions test/browser/components/side-panel/layer-configurator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ import {
LayerColumnConfigFactory,
LayerConfigGroupFactory,
FieldSelectorFactory,
ColumnSelectorFactory,
appInjector
} from '@kepler.gl/components';

import ColumnSelectorFactory from 'components/side-panel/layer-panel/column-selector';

import {StateWFiles, StateWTripGeojson, testCsvDataId} from 'test/helpers/mock-state';
import {
IntlWrapper,
Expand Down Expand Up @@ -72,7 +71,7 @@ const defaultProps = {
updateLayerVisConfig
};

test('Components -> LayerConfigurator.mount -> defaut prop', t => {
test('Components -> LayerConfigurator.mount -> defaut prop 1', t => {
// mount
let wrapper;
t.doesNotThrow(() => {
Expand Down Expand Up @@ -148,7 +147,7 @@ test('Components -> LayerConfigurator.mount -> defaut prop', t => {
t.end();
});

test('Components -> LayerConfigurator.mount -> defaut prop', t => {
test('Components -> LayerConfigurator.mount -> defaut prop 2', t => {
// mount
const updateLayerConfigSpy = sinon.spy();

Expand Down Expand Up @@ -198,13 +197,13 @@ test('Components -> LayerConfigurator.mount -> defaut prop', t => {
t.equal(
getItemSelectorListText(fieldSelector2, 0),
'gps_data',
'should render correct field paid name'
'should render correct field pair name'
);

// click list item suggested field pair
clickItemSelectList(fieldSelector2, 0);

t.ok(updateLayerConfigSpy.calledOnce, 'shoudl call updateLayerConfigSpy');
t.ok(updateLayerConfigSpy.calledOnce, 'should call updateLayerConfigSpy');
t.deepEqual(
updateLayerConfigSpy.args[0],
[
Expand Down Expand Up @@ -233,7 +232,7 @@ test('Components -> LayerConfigurator.mount -> defaut prop', t => {
// click single column
clickItemSelectList(fieldSelector2, 2);

t.ok(updateLayerConfigSpy.calledTwice, 'shoudl call updateLayerConfigSpy');
t.ok(updateLayerConfigSpy.calledTwice, 'should call updateLayerConfigSpy');
t.deepEqual(
updateLayerConfigSpy.args[1],
[
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/component-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {theme} from '@kepler.gl/styles';
import {ThemeProvider} from 'styled-components';
import {IntlProvider} from 'react-intl';
import {messages} from '@kepler.gl/localization';
import Typeahead from 'components/common/item-selector/typeahead';
import {Typeahead} from '@kepler.gl/components';

export function mountWithTheme(node, options) {
return mount(node, {
Expand Down

0 comments on commit 5a16901

Please sign in to comment.