2018-09-25 16:28:26 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
import { render } from '@ember/test-helpers';
|
2018-05-25 20:33:22 +00:00
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
module('Integration | Component | console/log text', function (hooks) {
|
2018-09-25 16:28:26 +00:00
|
|
|
setupRenderingTest(hooks);
|
2018-05-25 20:33:22 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
test('it renders', async function (assert) {
|
2018-09-25 16:28:26 +00:00
|
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
|
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
|
|
const text = 'Success! You did a thing!';
|
|
|
|
this.set('content', text);
|
2018-05-25 20:33:22 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
await render(hbs`{{console/log-text content=content}}`);
|
2018-05-25 20:33:22 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
assert.dom('pre').includesText(text);
|
|
|
|
});
|
2018-05-25 20:33:22 +00:00
|
|
|
});
|