2018-08-09 10:41:52 -07:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
2018-08-09 23:25:55 -07:00
|
|
|
import { render, find } from '@ember/test-helpers';
|
2018-04-09 19:04:11 -07:00
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
2018-06-25 23:42:28 -07:00
|
|
|
import { noop } from 'wherehows-web/utils/helpers/functions';
|
2018-04-09 19:04:11 -07:00
|
|
|
|
2018-08-09 10:41:52 -07:00
|
|
|
module('Integration | Component | avatars/avatars detail', function(hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
2018-04-09 19:04:11 -07:00
|
|
|
|
2018-08-09 10:41:52 -07:00
|
|
|
test('avatars detail render', async function(assert) {
|
|
|
|
const header = 'Avatar Detail Header';
|
2018-04-09 19:04:11 -07:00
|
|
|
|
2018-08-09 10:41:52 -07:00
|
|
|
this.set('header', header);
|
|
|
|
this.set('onClose', noop);
|
2018-04-09 19:04:11 -07:00
|
|
|
|
2018-08-09 10:41:52 -07:00
|
|
|
await render(hbs`
|
|
|
|
{{#avatars/avatars-detail header=header onClose=onClose}}
|
|
|
|
{{/avatars/avatars-detail}}
|
|
|
|
`);
|
2018-04-09 19:04:11 -07:00
|
|
|
|
2018-08-09 10:41:52 -07:00
|
|
|
assert.ok(find('.avatars-detail-modal'), 'it renders the element with expected className');
|
|
|
|
assert.ok(find('.avatars-detail-modal__header').textContent, header, 'it renders the avatar detail header');
|
|
|
|
});
|
2018-04-09 19:04:11 -07:00
|
|
|
});
|