Skip to content

Commit

Permalink
add type to keplerTable (#1905)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorDykhta committed Aug 9, 2022
1 parent bec013e commit 26b5f84
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/table-utils/kepler-table.ts
Expand Up @@ -166,6 +166,7 @@ class KeplerTable {
const datasetInfo = {
id: generateHashId(4),
label: 'new dataset',
type: '',
...info
};
const dataId = datasetInfo.id;
Expand All @@ -187,6 +188,7 @@ class KeplerTable {
};

this.id = datasetInfo.id;
this.type = datasetInfo.type;
this.label = datasetInfo.label;
this.color = color;
this.metadata = {
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/test-hex-id-data.js
Expand Up @@ -441,6 +441,7 @@ export const expectedMergedDataset = {
label: 'new dataset',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
dataContainer,
Expand Down
2 changes: 2 additions & 0 deletions test/node/reducers/vis-state-merger-test.js
Expand Up @@ -1535,6 +1535,7 @@ test('VisStateMerger.v1 -> mergeFilters -> multiFilters', t => {
label: 'hello.csv',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
fields: tFields0,
Expand Down Expand Up @@ -1612,6 +1613,7 @@ test('VisStateMerger.v1 -> mergeFilters -> multiFilters', t => {
label: 'zip.geojson',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
fields: tFields1,
Expand Down
9 changes: 9 additions & 0 deletions test/node/reducers/vis-state-test.js
Expand Up @@ -1259,6 +1259,7 @@ test('#visStateReducer -> UPDATE_VIS_DATA.2 -> to empty state', t => {
}
],
metadata: {id: 'smoothie', label: 'exciting dataset', album: 'taro_and_blue', format: ''},
type: '',
supportedFilterTypes: null,
disableDataOperation: false
}
Expand Down Expand Up @@ -1409,6 +1410,7 @@ test('#visStateReducer -> UPDATE_VIS_DATA.3 -> merge w/ existing state', t => {
label: 'smoothie and milkshake',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
fields: expectedFields,
Expand Down Expand Up @@ -1534,6 +1536,7 @@ test('#visStateReducer -> UPDATE_VIS_DATA.4.Geojson -> geojson data', t => {
label: 'king milkshake',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
id: 'milkshake',
Expand Down Expand Up @@ -1745,6 +1748,7 @@ test('#visStateReducer -> UPDATE_VIS_DATA -> mergeFilters', t => {
label: 'smoothie and milkshake',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
fields: expectedFields.map(f =>
Expand Down Expand Up @@ -2053,6 +2057,7 @@ test('#visStateReducer -> setFilter.dynamicDomain & cpu', t => {
label: 'queen smoothie',
format: ''
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false,
id: 'smoothie',
Expand Down Expand Up @@ -2140,6 +2145,7 @@ test('#visStateReducer -> setFilter.dynamicDomain & cpu', t => {
cpu: {[updatedFilterWValue.id]: 'added'},
gpu: null
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false
};
Expand Down Expand Up @@ -2366,6 +2372,7 @@ function testSetFilterDynamicDomainGPU(t, setFilter) {
cpu: null,
gpu: {[filterId]: 'value_changed'}
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false
};
Expand Down Expand Up @@ -2566,6 +2573,7 @@ test('#visStateReducer -> setFilter.fixedDomain & DynamicDomain & gpu & cpu', t
cpu: null,
gpu: {[filterId]: 'value_changed'}
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false
};
Expand Down Expand Up @@ -2638,6 +2646,7 @@ test('#visStateReducer -> setFilter.fixedDomain & DynamicDomain & gpu & cpu', t
cpu: {[filterId1]: 'added'},
gpu: null
},
type: '',
supportedFilterTypes: null,
disableDataOperation: false
};
Expand Down

0 comments on commit 26b5f84

Please sign in to comment.