decide.nolog.cz/tests/integration/components/poll-evaluation-chart-test.js
jelhan bb160cc503
refactor participants table (#164)
- Drops floatthead and additional scrollbar
- Makes header and first column sticky
- Refactors code for readability

Sticky header is only working in Firefox. Chrome and Edge does not support `position: sticky` for `<thead>`. Haven't tested Safari.
2019-04-20 23:29:59 +02:00

28 lines
749 B
JavaScript

import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import moment from 'moment';
module('Integration | Component | poll evaluation chart', function(hooks) {
setupRenderingTest(hooks);
hooks.beforeEach(function() {
moment.locale('en');
});
test('it renders', async function(assert) {
this.set('poll', {
answerType: 'YesNoMaybe',
options: [
{ title: '2015-01-01' },
],
users: [
{ selections: [{ type: 'yes' }]},
],
});
await render(hbs`{{poll-evaluation-chart poll=poll}}`);
assert.dom('canvas').exists('it renders a canvas element');
});
});