2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2021-05-31 09:18:54 -07:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
2021-06-04 13:38:24 -07:00
|
|
|
import { render, find } from '@ember/test-helpers';
|
2021-05-31 09:18:54 -07:00
|
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
|
|
|
|
|
|
|
|
module('Integration | Component | dialog-detail', function (hooks) {
|
|
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
2021-06-04 13:38:24 -07:00
|
|
|
test('it renders', async function (assert) {
|
2021-05-31 09:18:54 -07:00
|
|
|
await render(hbs`<DialogDetail />`);
|
2021-06-08 16:36:23 -04:00
|
|
|
assert.ok(find('.dialog-detail'));
|
2021-06-04 13:38:24 -07:00
|
|
|
});
|
2021-05-31 09:18:54 -07:00
|
|
|
|
2021-06-04 13:38:24 -07:00
|
|
|
test('it renders with content', async function (assert) {
|
2021-05-31 09:18:54 -07:00
|
|
|
await render(hbs`
|
2021-10-23 12:55:23 -04:00
|
|
|
<DialogDetail as |dialogDetail|>
|
2021-06-04 13:38:24 -07:00
|
|
|
<dialogDetail.notification />
|
|
|
|
|
<dialogDetail.body>
|
|
|
|
|
<h2>Test</h2>
|
|
|
|
|
</dialogDetail.body>
|
|
|
|
|
<dialogDetail.footer></dialogDetail.footer>
|
2021-05-31 09:18:54 -07:00
|
|
|
</DialogDetail>
|
|
|
|
|
`);
|
|
|
|
|
|
2021-06-08 16:36:23 -04:00
|
|
|
assert.ok(find('.dialog-detail'));
|
2021-06-04 13:38:24 -07:00
|
|
|
assert.ok(find('.rose-dialog-header'));
|
|
|
|
|
assert.ok(find('.rose-dialog-body'));
|
|
|
|
|
assert.ok(find('.rose-dialog-footer'));
|
2021-05-31 09:18:54 -07:00
|
|
|
});
|
|
|
|
|
});
|