From f14346d3a47fb9ca07e72af74d287dccfabe75fe Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Date: Fri, 4 Jun 2021 13:38:24 -0700 Subject: [PATCH] Add uni test for dialog detail and fix lint errors --- .../app/components/dialog-detail/index.hbs | 20 ++++++++-------- .../scopes/scope/projects/targets.hbs | 10 +++++--- .../components/dialog-detail-test.js | 24 +++++++++++-------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/ui/desktop/app/components/dialog-detail/index.hbs b/ui/desktop/app/components/dialog-detail/index.hbs index df3ca1b50..a37cc4273 100644 --- a/ui/desktop/app/components/dialog-detail/index.hbs +++ b/ui/desktop/app/components/dialog-detail/index.hbs @@ -8,14 +8,16 @@ @modal={{true}} as |dialog| > - {{yield (hash - notification=(component 'rose/notification' class='connection-dialog-notification') - )}} + {{yield + (hash + notification=(component + 'rose/notification' class='connection-dialog-notification' + ) + ) + }} - {{yield (hash - body=(component 'rose/anonymous') - )}} + {{yield (hash body=(component 'rose/anonymous'))}} {{!--

Credentials

@@ -108,10 +110,8 @@
Code
--}} -
+ - {{yield (hash - footer=(component 'rose/anonymous') - )}} + {{yield (hash footer=(component 'rose/anonymous'))}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index 43ef98abf..a38ea78ee 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -5,7 +5,11 @@ {{#if session.started_desktop_client}} {{#unless session.acknowledged}} + />

{{t 'resources.target.host-set.detail.proxy_url'}}

@@ -45,7 +49,7 @@
- {{! `); + assert.ok(find('.connection-dialog')); + }); - assert.equal(this.element.textContent.trim(), ''); - - // Template block usage: + test('it renders with content', async function (assert) { await render(hbs` - template block text + + +

Test

+
+
`); - assert.equal(this.element.textContent.trim(), 'template block text'); + assert.ok(find('.connection-dialog')); + assert.ok(find('.rose-dialog-header')); + assert.ok(find('.rose-dialog-body')); + assert.ok(find('.rose-dialog-footer')); }); });