mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fixing test (stacking happens for grouped charts as well to handle negative values correctly)
This commit is contained in:
parent
682ab0b22d
commit
69a53eaf26
2 changed files with 7 additions and 9 deletions
|
@ -76,7 +76,7 @@ describe('Vislib VisConfig Class Test Suite', function () {
|
|||
.node();
|
||||
|
||||
visConfig = new VisConfig({
|
||||
type: 'histogram',
|
||||
type: 'point_series',
|
||||
el: el
|
||||
}, data, new PersistedState());
|
||||
}));
|
||||
|
@ -88,7 +88,7 @@ describe('Vislib VisConfig Class Test Suite', function () {
|
|||
|
||||
it('should get the property', function () {
|
||||
expect(visConfig.get('el')).to.be(el);
|
||||
expect(visConfig.get('type')).to.be('histogram');
|
||||
expect(visConfig.get('type')).to.be('point_series');
|
||||
});
|
||||
|
||||
it('should return defaults if property does not exist', function () {
|
||||
|
@ -96,7 +96,9 @@ describe('Vislib VisConfig Class Test Suite', function () {
|
|||
});
|
||||
|
||||
it('should throw an error if property does not exist and defaults were not provided', function () {
|
||||
expect(visConfig.get('this.does.not.exist')).to.throwError();
|
||||
expect(function () {
|
||||
visConfig.get('this.does.not.exist');
|
||||
}).to.throwError();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -69,12 +69,8 @@ dataTypesArray.forEach(function (dataType, i) {
|
|||
});
|
||||
});
|
||||
|
||||
it('should not stack values if grouped mode is set', function () {
|
||||
if (mode === 'grouped') {
|
||||
expect(isStacked).to.be(false);
|
||||
} else {
|
||||
expect(isStacked).to.be(true);
|
||||
}
|
||||
it('should stack values', function () {
|
||||
expect(isStacked).to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue