Add uni test for dialog detail and fix lint errors
This commit is contained in:
1 parent
c2b4c0ad8b
commit
f14346d3a4
3 files changed
+31
-23
No files matched your search
@@ -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'
|
||||
)
|
||||
)
|
||||
}}
|
||||
|
||||
<dialog.body>
|
||||
{{yield (hash
|
||||
body=(component 'rose/anonymous')
|
||||
)}}
|
||||
{{yield (hash body=(component 'rose/anonymous'))}}
|
||||
{{!--
|
||||
<Rose::Separator />
|
||||
<h3>Credentials</h3>
|
||||
@@ -108,10 +110,8 @@
|
||||
<div>Code</div>
|
||||
</div>
|
||||
</div>--}}
|
||||
</dialog.body>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
{{yield (hash
|
||||
footer=(component 'rose/anonymous')
|
||||
)}}
|
||||
{{yield (hash footer=(component 'rose/anonymous'))}}
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
@@ -5,7 +5,11 @@
|
||||
{{#if session.started_desktop_client}}
|
||||
{{#unless session.acknowledged}}
|
||||
<DialogDetail
|
||||
@heading={{concat (t 'resources.target.host-set.detail.title') ': ' session.id}}
|
||||
@heading={{concat
|
||||
(t 'resources.target.host-set.detail.title')
|
||||
': '
|
||||
session.id
|
||||
}}
|
||||
@dismiss={{route-action 'acknowledge' session}}
|
||||
@dismissButtonText={{t 'actions.ok'}}
|
||||
as |dialogDetail|
|
||||
@@ -13,7 +17,7 @@
|
||||
<dialogDetail.notification
|
||||
@style='success'
|
||||
@heading={{t 'resources.target.messages.connection-success'}}
|
||||
></dialogDetail.notification>
|
||||
/>
|
||||
|
||||
<dialogDetail.body>
|
||||
<h3>{{t 'resources.target.host-set.detail.proxy_url'}}</h3>
|
||||
@@ -45,7 +49,7 @@
|
||||
</Rose::Button>
|
||||
</div>
|
||||
<div>
|
||||
{{! <Rose::LinkButton
|
||||
{{! <Rose::LinkButton
|
||||
@route='index'
|
||||
@style='inline-link-action'
|
||||
@iconRight='chevron-right'
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
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 | dialog-detail', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test.skip('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
await render(hbs`<DialogDetail />`);
|
||||
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`
|
||||
<DialogDetail>
|
||||
template block text
|
||||
<dialogDetail.notification />
|
||||
<dialogDetail.body>
|
||||
<h2>Test</h2>
|
||||
</dialogDetail.body>
|
||||
<dialogDetail.footer></dialogDetail.footer>
|
||||
</DialogDetail>
|
||||
`);
|
||||
|
||||
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'));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user