Issue #475: Percentage data in flot graphs tests

+ base.js fixtures now include percentage data
+ slickgrid tests updated to hide p field in fixtures
+ added test scenario for percentage data in tests for flot view
This commit is contained in:
Teofilo Sibileau
2015-04-01 14:34:51 -03:00
parent bb0d41a2e4
commit 19f12b1c82
3 changed files with 34 additions and 12 deletions

View File

@@ -55,6 +55,27 @@ test('dates in graph view', function () {
view.remove();
});
test('percentages in graph view', function () {
var dataset = Fixture.getDataset();
var view = new recline.View.Flot({
model: dataset,
state: {
'graphType': 'lines',
'group': 'country',
'series': ['p']
}
});
view.render();
$('.fixtures').append(view.el);
view.redraw();
var graphData = view.plot.getData()[0].data;
$.each(graphData, function(i, p){
var percentage = p[1];
equal($.isNumeric(percentage), true);
});
view.remove();
});
test('FlotControls basics', function () {
var dataset = Fixture.getDataset();
var view = new recline.View.FlotControls({