Skip to content

Commit

Permalink
remove the test that is not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Oct 26, 2023
1 parent d1840bc commit c93d3f8
Showing 1 changed file with 0 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,53 +545,6 @@ describe('DatatableComponent', () => {
});
});

test('it detect last_value filtered metric type', () => {
const { data, args } = sampleArgs();

const column = data.columns[1];

column.meta = {
...column.meta,
field: undefined,
type: 'number',
sourceParams: { ...column.meta.sourceParams, type: 'filtered_metric' },
};
data.rows[0].b = 'Hello';

const wrapper = shallow(
<DatatableComponent
data={data}
args={{
...args,
columns: [
{ columnId: 'a', alignment: 'center', type: 'lens_datatable_column' },
{ columnId: 'b', type: 'lens_datatable_column' },
{ columnId: 'c', type: 'lens_datatable_column' },
],
sortingColumnId: 'b',
sortingDirection: 'desc',
}}
formatFactory={() => ({ convert: (x) => x } as IFieldFormat)}
dispatchEvent={onDispatchEvent}
getType={jest.fn()}
renderMode="view"
paletteService={chartPluginMock.createPaletteRegistry()}
theme={setUpMockTheme}
interactive
renderComplete={renderComplete}
/>
);

expect(wrapper.find(DataContext.Provider).prop('value').alignments).toEqual({
// set via args
a: 'center',
// default for string
b: 'left',
// default for number
c: 'right',
});
});

test('it should refresh the table header when the datatable data changes', () => {
const { data, args } = sampleArgs();

Expand Down

0 comments on commit c93d3f8

Please sign in to comment.