mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
[explore-v2] hook up ExploreViewContainer to state and add specs (#1300)
* add getParams func to common * get data from redux state * specs for chart container and explore view container
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'mocha';
|
||||
|
||||
import ChartContainer from '../../../../javascripts/explorev2/components/ChartContainer';
|
||||
|
||||
describe('ChartContainer', () => {
|
||||
const mockProps = {
|
||||
data: [
|
||||
{
|
||||
classed: '',
|
||||
key: 'Label 1',
|
||||
values: [
|
||||
{
|
||||
x: -158766400000,
|
||||
y: 57,
|
||||
},
|
||||
{
|
||||
x: -156766400000,
|
||||
y: 157,
|
||||
},
|
||||
{
|
||||
x: -157766400000,
|
||||
y: 257,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
sliceName: 'Trend Line',
|
||||
vizType: 'line',
|
||||
height: '500px',
|
||||
};
|
||||
|
||||
it('renders when vizType is line', () => {
|
||||
expect(
|
||||
React.isValidElement(<ChartContainer {...mockProps} />)
|
||||
).to.equal(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user