diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-03-04 19:10:04 +0100 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-03-04 19:10:04 +0100 |
commit | 15dde408db57009e1e4e26d969b9b3e6c1e0c255 (patch) | |
tree | bed87bc591f44dbdc7967c2c9f8b26dd1b040f49 /web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js | |
parent | 2e808e318a7b9abd09bf93116dae5368025c3611 (diff) |
nms: Remove redundant files
speedometer probably doesn't work now anyway until it's heavily updated.
Diffstat (limited to 'web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js')
-rw-r--r-- | web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js b/web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js deleted file mode 100644 index 4e62070..0000000 --- a/web/nms.gathering.org/speedometer/c3-master/spec/interaction-spec.js +++ /dev/null @@ -1,116 +0,0 @@ -describe('c3 chart interaction', function () { - 'use strict'; - - var chart, args; - - beforeEach(function (done) { - chart = window.initChart(chart, args, done); - }); - - describe('generate event rects', function () { - - describe('custom x', function () { - - it('should generate bar chart', function () { - args = { - data: { - x: 'x', - columns: [ - ['x', 0, 1000, 3000, 10000], - ['data', 10, 10, 10, 10] - ], - type: 'bar' - } - }; - expect(true).toBeTruthy(); - }); - - it('should have 4 event rects properly', function () { - var lefts = [78, 138, 205.5, 407.5], - widths = [60, 67.5, 202, 194]; - d3.selectAll('.c3-event-rect').each(function (d, i) { - var box = d3.select(this).node().getBoundingClientRect(); - expect(box.left).toBeCloseTo(lefts[i], -2); - expect(box.width).toBeCloseTo(widths[i], -2); - }); - }); - - it('should generate bar chart with only one data', function () { - args = { - data: { - x: 'x', - columns: [ - ['x', 0], - ['data', 10] - ], - type: 'bar' - } - }; - expect(true).toBeTruthy(); - }); - - it('should have 1 event rects properly', function () { - var eventRects = d3.selectAll('.c3-event-rect'); - expect(eventRects.size()).toBe(1); - eventRects.each(function () { - var box = d3.select(this).node().getBoundingClientRect(); - expect(box.left).toBeCloseTo(40.5, -2); - expect(box.width).toBeCloseTo(598, -2); - }); - }); - }); - - describe('timeseries', function () { - - it('should generate line chart with timeseries', function () { - args = { - data: { - x: 'x', - columns: [ - ['x', '20140101', '20140201', '20140210', '20140301'], - ['data', 10, 10, 10, 10] - ] - } - }; - expect(true).toBeTruthy(); - }); - - it('should have 4 event rects properly', function () { - var lefts = [43.5, 193, 353, 500], - widths = [149.5, 160, 147, 136]; - d3.selectAll('.c3-event-rect').each(function (d, i) { - var box = d3.select(this).node().getBoundingClientRect(); - expect(box.left).toBeCloseTo(lefts[i], -2); - expect(box.width).toBeCloseTo(widths[i], -2); - }); - - }); - - it('should generate line chart with only 1 data timeseries', function () { - args = { - data: { - x: 'x', - columns: [ - ['x', '20140101'], - ['data', 10] - ] - } - }; - expect(true).toBeTruthy(); - }); - - it('should have 1 event rects properly', function () { - var eventRects = d3.selectAll('.c3-event-rect'); - expect(eventRects.size()).toBe(1); - eventRects.each(function () { - var box = d3.select(this).node().getBoundingClientRect(); - expect(box.left).toBeCloseTo(40.5, -2); - expect(box.width).toBeCloseTo(598, -2); - }); - }); - - }); - - }); - -}); |