mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 16:21:24 -05:00
26 lines
706 B
JavaScript
26 lines
706 B
JavaScript
import componentTest from 'helpers/component-test';
|
|
moduleForComponent('poll-option', { integration: true });
|
|
|
|
componentTest('test poll option', {
|
|
template: '{{poll-option option=option isMultiple=isMultiple}}',
|
|
|
|
setup(store) {
|
|
this.set('option', Em.Object.create({ id: 1, selected: false }));
|
|
},
|
|
|
|
test(assert) {
|
|
assert.ok(this.$('li .fa-circle-o:eq(0)').length === 1);
|
|
|
|
this.set('option.selected', true);
|
|
|
|
assert.ok(this.$('li .fa-dot-circle-o:eq(0)').length === 1);
|
|
|
|
this.set('isMultiple', true);
|
|
|
|
assert.ok(this.$('li .fa-check-square-o:eq(0)').length === 1);
|
|
|
|
this.set('option.selected', false);
|
|
|
|
assert.ok(this.$('li .fa-square-o:eq(0)').length === 1);
|
|
}
|
|
});
|