mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
debugging test failure that only occurs on travis
This commit is contained in:
parent
b846d4e5a5
commit
bc8876cad6
4 changed files with 10 additions and 4 deletions
|
@ -9,7 +9,7 @@ define(function (require) {
|
|||
ErrorHandler.prototype.validateWidthandHeight = function (width, height) {
|
||||
if (_.isNaN(height) || height <= 0 || _.isNaN(width) || width <= 0) {
|
||||
throw new Error('The height and/or width of this container is too ' +
|
||||
'small for this chart.');
|
||||
'small for this chart. w:' + width + ', h:' + height);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -83,10 +83,12 @@ define(function (require) {
|
|||
|
||||
el = d3.select('body').append('div')
|
||||
.attr('class', 'vis-wrapper');
|
||||
|
||||
el.append('div')
|
||||
.attr('class', 'y-axis-title')
|
||||
.style('height', '20px')
|
||||
.style('width', '20px');
|
||||
|
||||
el.append('div')
|
||||
.attr('class', 'x-axis-title')
|
||||
.style('height', '20px')
|
||||
|
|
|
@ -116,7 +116,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
it('should resize the chart', function () {
|
||||
expect($('.chart').width()).to.be.lessThan(500);
|
||||
expect($('.chart').width()).to.be.eql(500);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
define(function (require) {
|
||||
var angular = require('angular');
|
||||
var _ = require('lodash');
|
||||
var d3 = require('d3');
|
||||
var $ = require('jquery');
|
||||
|
||||
angular.module('YAxisFactory', ['kibana']);
|
||||
|
@ -124,7 +125,9 @@ define(function (require) {
|
|||
Data = Private(require('components/vislib/lib/data'));
|
||||
YAxis = Private(require('components/vislib/lib/y_axis'));
|
||||
|
||||
el = d3.select('body').append('div')
|
||||
var node = $('<div>').get(0);
|
||||
|
||||
el = d3.select(node).append('div')
|
||||
.attr('class', 'y-axis-wrapper')
|
||||
.style('height', '40px')
|
||||
.datum(data);
|
||||
|
@ -134,7 +137,7 @@ define(function (require) {
|
|||
|
||||
dataObj = new Data(data, {});
|
||||
yAxis = new YAxis({
|
||||
el: $('.y-axis-wrapper')[0],
|
||||
el: node,
|
||||
yMax: dataObj.getYMaxValue(),
|
||||
_attr: {
|
||||
margin: { top: 0, right: 0, bottom: 0, left: 0 }
|
||||
|
@ -150,6 +153,7 @@ define(function (require) {
|
|||
|
||||
describe('render Method', function () {
|
||||
beforeEach(function () {
|
||||
expect(d3.select(yAxis.el).selectAll('.y-axis-div')).to.have.length(1);
|
||||
yAxis.render();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue