2024-09-18 15:19:27 +00:00
|
|
|
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-08-22 17:57:53 +00:00
|
|
|
|
2024-09-18 15:19:27 +00:00
|
|
|
module("Integration | Component | timeline/note", function (hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
2024-08-22 17:57:53 +00:00
|
|
|
|
2024-09-18 15:19:27 +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-08-22 17:57:53 +00:00
|
|
|
|
2024-09-18 15:19:27 +00:00
|
|
|
await render(hbs`<Timeline::Note />`);
|
2024-08-22 17:57:53 +00:00
|
|
|
|
2024-09-18 15:19:27 +00:00
|
|
|
assert.dom().hasText("");
|
2024-08-22 17:57:53 +00:00
|
|
|
|
2024-09-18 15:19:27 +00:00
|
|
|
// Template block usage:
|
|
|
|
await render(hbs`
|
|
|
|
<Timeline::Note @username="bob" @content="some content"/>
|
2024-08-22 17:57:53 +00:00
|
|
|
`);
|
|
|
|
|
2024-09-18 15:19:27 +00:00
|
|
|
assert.dom("h3").hasText("bob");
|
|
|
|
assert.dom("p").hasText("some content");
|
|
|
|
});
|
2024-08-22 17:57:53 +00:00
|
|
|
});
|