2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2020-11-25 12:32:47 -05:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
2021-03-19 11:54:28 -04:00
|
|
|
import { render, find } from '@ember/test-helpers';
|
2020-11-25 12:32:47 -05:00
|
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
|
|
|
|
2021-03-05 17:49:47 -05:00
|
|
|
module('Integration | Component | branded-card', function (hooks) {
|
2020-11-25 12:32:47 -05:00
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
2021-03-05 17:49:47 -05:00
|
|
|
test('it renders', async function (assert) {
|
2020-11-25 12:32:47 -05:00
|
|
|
await render(hbs`<BrandedCard />`);
|
2021-03-19 11:54:28 -04:00
|
|
|
assert.ok(find('.branded-card'));
|
|
|
|
|
assert.ok(find('.branded-card-title'));
|
|
|
|
|
assert.ok(find('.branded-card-description'));
|
|
|
|
|
});
|
2020-11-25 12:32:47 -05:00
|
|
|
|
2021-03-19 11:54:28 -04:00
|
|
|
test('it renders with content', async function (assert) {
|
|
|
|
|
await render(hbs`<BrandedCard
|
|
|
|
|
@title="title"
|
|
|
|
|
@description="description"
|
|
|
|
|
/>`);
|
2022-07-07 11:18:51 -07:00
|
|
|
assert.strictEqual(find('.branded-card-title').textContent.trim(), 'title');
|
|
|
|
|
assert.strictEqual(
|
2021-03-19 11:54:28 -04:00
|
|
|
find('.branded-card-description').textContent.trim(),
|
|
|
|
|
'description'
|
|
|
|
|
);
|
2020-11-25 12:32:47 -05:00
|
|
|
});
|
|
|
|
|
});
|