test: add missing frame tests

This commit is contained in:
Randall Morey committed 2021-04-08 11:26:29 -04:00
1 parent 8889e86cec
commit f3bd8d0b6f
2 files changed
+7 -13

No files matched your search

@@ -4,8 +4,8 @@
{{yield to="header"}}
</header>
<section class="rose-frame-body">
<div class="rose-frame-body">
{{yield to="body"}}
</section>
</div>
</section>
@@ -1,26 +1,20 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { render, find } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | rose/frame', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
await render(hbs`<Rose::Frame />`);
assert.equal(this.element.textContent.trim(), '');
// Template block usage:
await render(hbs`
<Rose::Frame>
<:body>template block text</:body>
<:header>Header</:header>
<:body>Body</:body>
</Rose::Frame>
`);
assert.equal(this.element.textContent.trim(), 'template block text');
assert.ok(find('section > header'));
assert.ok(find('section > div'));
});
});