linstrom/frontend-reactive/tests/integration/components/note/user-header-test.ts

22 lines
782 B
TypeScript
Raw Normal View History

import { module, test } from 'qunit';
import { setupRenderingTest } from 'frontend-reactive/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
2024-09-19 11:50:04 +00:00
module('Integration | Component | note/user-header', function (hooks) {
setupRenderingTest(hooks);
2024-09-19 11:50:04 +00:00
test('it renders', async function (assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
2024-09-19 11:50:04 +00:00
await render(
hbs`<Note::UserHeader @displayname="bob" @handle="@alice@example.com"/>`,
);
2024-09-19 11:50:04 +00:00
assert.dom('p.note-user-displayname').hasText('bob');
assert.dom('p.note-user-handle').hasText('@alice@example.com');
// TODO: Expand tests to include profile picture
});
2024-09-19 11:50:04 +00:00
});