test: Update set password form test
This commit is contained in:
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'));
|
||||
});
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user