mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
fixing unit tests
This commit is contained in:
parent
978e9e265a
commit
d2168d7c22
5 changed files with 8 additions and 9 deletions
|
@ -13,7 +13,7 @@ describe('addToSiri', function () {
|
|||
const series = new Map();
|
||||
const point = {};
|
||||
const id = 'id';
|
||||
addToSiri(series, point, id);
|
||||
addToSiri(series, point, id, id, { id: id });
|
||||
|
||||
expect(series.has(id)).to.be(true);
|
||||
expect(series.get(id)).to.be.an('object');
|
||||
|
@ -27,10 +27,10 @@ describe('addToSiri', function () {
|
|||
const id = 'id';
|
||||
|
||||
const point = {};
|
||||
addToSiri(series, point, id);
|
||||
addToSiri(series, point, id, id, { id: id });
|
||||
|
||||
const point2 = {};
|
||||
addToSiri(series, point2, id);
|
||||
addToSiri(series, point2, id, id, { id: id });
|
||||
|
||||
expect(series.has(id)).to.be(true);
|
||||
expect(series.get(id)).to.be.an('object');
|
||||
|
@ -45,7 +45,7 @@ describe('addToSiri', function () {
|
|||
const id = 'id';
|
||||
const label = 'label';
|
||||
const point = {};
|
||||
addToSiri(series, point, id, label);
|
||||
addToSiri(series, point, id, label, { id: id });
|
||||
|
||||
expect(series.has(id)).to.be(true);
|
||||
expect(series.get(id)).to.be.an('object');
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('getSeries', function () {
|
|||
const chart = {
|
||||
aspects: {
|
||||
x: { i: 0 },
|
||||
y: { i: 1, col: yCol },
|
||||
y: { i: 1, col: yCol, agg: { id: 'id' } },
|
||||
z: { i: 2 }
|
||||
}
|
||||
};
|
||||
|
@ -119,7 +119,7 @@ describe('getSeries', function () {
|
|||
aspects: {
|
||||
x: { i: -1 },
|
||||
series: { i: 0, agg: agg },
|
||||
y: { i: 1, col: { title: '0' } }
|
||||
y: { i: 1, col: { title: '0' }, agg: agg }
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ export default function PointSeriesAddToSiri() {
|
|||
|
||||
series.set(id, {
|
||||
label: label == null ? id : label,
|
||||
aggLabel: agg.type.makeLabel(agg),
|
||||
aggLabel: agg.type ? agg.type.makeLabel(agg) : label,
|
||||
aggId: agg.parentId ? agg.parentId : agg.id,
|
||||
count: 0,
|
||||
values: [point]
|
||||
|
|
|
@ -92,7 +92,6 @@ describe('Vis Class', function () {
|
|||
expect(vis).to.have.property('params');
|
||||
expect(vis.params).to.have.property('addLegend', true);
|
||||
expect(vis.params).to.have.property('addTooltip', true);
|
||||
expect(vis.params).to.have.property('mode', 'stacked');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
bdd.describe('chart types', function indexPatternCreation() {
|
||||
bdd.it('should show the correct chart types', function () {
|
||||
const expectedChartTypes = [
|
||||
'Area chart', 'Data table', 'Heatmap chart', 'Line chart', 'Markdown widget',
|
||||
'Area chart', 'Data table', 'Heatmap chart', 'Horizontal bar chart', 'Line chart', 'Markdown widget',
|
||||
'Metric', 'Pie chart', 'Tag cloud', 'Tile map', 'Timeseries', 'Vertical bar chart'
|
||||
];
|
||||
// find all the chart types and make sure there all there
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue