test: Update set password form test

This commit is contained in:
Susmitha Girumala committed 2020-09-15 14:18:48 -04:00
1 parent 64fb123b73
commit 40d1e0ea7a
1 file changed
+11 -13
@@ -1,26 +1,24 @@
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 | form/account/password/set-password', 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) { ... });
this.submit = () => {};
this.cancel = () => {};
this.model = { type: 'password' };
await render(hbs`<Form::Account::Password::SetPassword />`);
assert.equal(this.element.textContent.trim(), '');
// Template block usage:
await render(hbs`
<Form::Account::Password::SetPassword>
template block text
</Form::Account::Password::SetPassword>
`);
<Form::Account::Password::SetPassword
@model={{this.model}}
@submit={{this.submit}}
@cancel={{this.cancel}}
/>`);
assert.equal(this.element.textContent.trim(), 'template block text');
assert.ok(find('form'));
});
});