File size: 952 Bytes
7e79d67 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | import hbs from 'htmlbars-inline-precompile';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { assertChart, renderChart } from 'ember-google-charts/test-support';
module('Integration | Component | scatter chart', function(hooks) {
setupRenderingTest(hooks);
const data = [
['Element', 'Density', { role: 'style' }],
['Copper', 8.94, '#b87333'],
['Silver', 10.49, 'silver'],
['Gold', 19.30, 'gold'],
['Platinum', 21.45, 'color: #e5e4e2'],
];
const options = {
title: 'Element densities',
};
test('Rendering the chart', async function(assert) {
assert.expect(10);
this.set('data', data);
this.set('options', options);
const chart = await renderChart(hbs`<ScatterChart @data={{this.data}} @options={{this.options}} />`);
assertChart(assert, chart, {
data,
design: 'material',
options,
type: 'scatter',
});
});
});
|