import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('my-component', 'TODO: put something here', { integration: true }); test('it renders', function(assert) { // Template block usage: this.render(hbs` {{#my-component}} template block text {{/my-component}} `); assert.equal(this.$('#a-nice-person').text().trim(), 'Nice person'); assert.equal(Ember.$('#my-puppy').length, 0); this.$('button').click(); assert.equal(Ember.$('#my-puppy').text().trim(), 'A puppy'); this.$('button').click(); assert.equal(Ember.$('#my-puppy').length, 0); });