test: Update integration tests in desktop

This commit is contained in:
Susmitha Girumala committed 2021-03-19 11:54:28 -04:00
1 parent f487c4f0d9
commit 6ce09162d7
1 file changed
+15 -14
@@ -1,26 +1,27 @@
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 | branded-card', 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`<BrandedCard />`);
assert.ok(find('.branded-card'));
assert.ok(find('.branded-card-title'));
assert.ok(find('.branded-card-description'));
});
assert.equal(this.element.textContent.trim(), '');
// Template block usage:
await render(hbs`
<BrandedCard>
template block text
</BrandedCard>
`);
assert.equal(this.element.textContent.trim(), 'template block text');
test('it renders with content', async function (assert) {
await render(hbs`<BrandedCard
@title="title"
@description="description"
/>`);
assert.equal(find('.branded-card-title').textContent.trim(), 'title');
assert.equal(
find('.branded-card-description').textContent.trim(),
'description'
);
});
});