mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
adding test for non heatmap chart
This commit is contained in:
parent
1558649959
commit
b102c95b54
1 changed files with 21 additions and 5 deletions
|
@ -9,7 +9,13 @@ describe('Point Series Config Type Class Test Suite', function () {
|
|||
let pointSeriesConfig;
|
||||
let parsedConfig;
|
||||
let el;
|
||||
const config = {
|
||||
const histogramConfig = {
|
||||
type: 'histogram',
|
||||
addLegend: true,
|
||||
addTooltip: true,
|
||||
};
|
||||
|
||||
const heatmapConfig = {
|
||||
type: 'heatmap',
|
||||
addLegend: true,
|
||||
addTooltip: true,
|
||||
|
@ -71,6 +77,16 @@ describe('Point Series Config Type Class Test Suite', function () {
|
|||
pointSeriesConfig = Private(VislibLibVisPointSeriesTypeConfigProvider);
|
||||
}));
|
||||
|
||||
describe('histogram chart', function () {
|
||||
beforeEach(function () {
|
||||
parsedConfig = pointSeriesConfig.heatmap(histogramConfig, data);
|
||||
});
|
||||
it('should not throw an error when more than 25 series are provided', function () {
|
||||
expect(parsedConfig.error).to.be.undefined;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('heatmap chart', function () {
|
||||
beforeEach(function () {
|
||||
const stackedData = {
|
||||
|
@ -78,15 +94,15 @@ describe('Point Series Config Type Class Test Suite', function () {
|
|||
getLabels: () => [],
|
||||
data: stackedSeries
|
||||
};
|
||||
parsedConfig = pointSeriesConfig.heatmap(config, stackedData);
|
||||
parsedConfig = pointSeriesConfig.heatmap(heatmapConfig, stackedData);
|
||||
});
|
||||
|
||||
it('should throw an error when less than 25 series are provided', function () {
|
||||
parsedConfig = pointSeriesConfig.heatmap(config, data);
|
||||
it('should throw an error when more than 25 series are provided', function () {
|
||||
parsedConfig = pointSeriesConfig.heatmap(heatmapConfig, data);
|
||||
expect(parsedConfig.error).to.be('There are too many series defined.');
|
||||
});
|
||||
|
||||
it('should not throw an error when more than 25 series are provided', function () {
|
||||
it('should not throw an error when less than 25 series are provided', function () {
|
||||
expect(parsedConfig.error).to.be.undefined;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue