chore: 🤖 Add card link component to rose addon

This commit is contained in:
Susmitha Girumala committed 2020-05-29 15:31:25 -04:00
1 parent ff41bf365d
commit c8bca555dd
9 files changed
+173

No files matched your search

@@ -0,0 +1,43 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | rose/card/link', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`<Rose::Card::Link />`);
assert.ok(find('article'));
assert.ok(find('.rose-card-link'));
});
test('it renders with @title', async function (assert) {
await render(hbs`<Rose::Card::Link @title="card title" />`);
assert.equal(find('a').title, 'card title');
assert.equal(
find('.rose-card-link-title').textContent.trim(),
'card title'
);
});
test('it renders with @description', async function (assert) {
await render(hbs`<Rose::Card::Link @description="card description" />`);
assert.equal(
find('.rose-card-link-description').textContent.trim(),
'card description'
);
});
test('it renders with attributes', async function (assert) {
await render(hbs`<Rose::Card::Link id="card" />`);
assert.ok(find('#card'));
});
test('it renders with content', async function (assert) {
await render(hbs`<Rose::Card::Link>
<button/>
</Rose::Card::Link>`);
assert.ok(find('button'));
});
});