From 64fb123b73be6d3951bc04fe4b657c809d950411 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Tue, 15 Sep 2020 11:16:27 -0400 Subject: [PATCH] refactor: Conver password's setting form into set-password --- .../{settings.hbs => set-password.hbs} | 0 .../auth-method/accounts/account/settings.hbs | 2 +- .../account/password/set-password-test.js | 26 +++++++++++++++++++ .../form/account/password/settings-test.js | 23 ---------------- 4 files changed, 27 insertions(+), 24 deletions(-) rename ui/core/app/components/form/account/password/{settings.hbs => set-password.hbs} (100%) create mode 100644 ui/core/tests/integration/components/form/account/password/set-password-test.js delete mode 100644 ui/core/tests/integration/components/form/account/password/settings-test.js diff --git a/ui/core/app/components/form/account/password/settings.hbs b/ui/core/app/components/form/account/password/set-password.hbs similarity index 100% rename from ui/core/app/components/form/account/password/settings.hbs rename to ui/core/app/components/form/account/password/set-password.hbs diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/settings.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/settings.hbs index 348503f1b..98fe07606 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/settings.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/settings.hbs @@ -1,6 +1,6 @@

{{t 'descriptions.account-settings-overview'}}

-`); + + assert.equal(this.element.textContent.trim(), ''); + + // Template block usage: + await render(hbs` + + template block text + + `); + + assert.equal(this.element.textContent.trim(), 'template block text'); + }); +}); diff --git a/ui/core/tests/integration/components/form/account/password/settings-test.js b/ui/core/tests/integration/components/form/account/password/settings-test.js deleted file mode 100644 index c905dd76d..000000000 --- a/ui/core/tests/integration/components/form/account/password/settings-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/account/password/settings', function(hooks) { - setupRenderingTest(hooks); - - test('it renders', async function(assert) { - this.submit = () => {}; - this.cancel = () => {}; - this.model = { type: 'password' }; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -});