See https://github.com/ember-cli/ember-cli-htmlbars#tagged-template-usage--migrating-from-htmlbars-inline-precompile
33 lines
893 B
JavaScript
33 lines
893 B
JavaScript
import { module, test } from "qunit";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
import { render } from "@ember/test-helpers";
|
|
import { configureEyeline } from "discourse/lib/eyeline";
|
|
import { hbs } from "ember-cli-htmlbars";
|
|
|
|
module("Integration | Component | load-more", function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
hooks.beforeEach(function () {
|
|
configureEyeline({
|
|
skipUpdate: false,
|
|
rootElement: "#ember-testing",
|
|
});
|
|
});
|
|
|
|
hooks.afterEach(function () {
|
|
configureEyeline();
|
|
});
|
|
|
|
test("updates once after initialization", async function (assert) {
|
|
this.set("loadMore", () => this.set("loadedMore", true));
|
|
|
|
await render(hbs`
|
|
<LoadMore @selector=".numbers tr" @action={{this.loadMore}}>
|
|
<table class="numbers"><tr></tr></table>
|
|
</LoadMore>
|
|
`);
|
|
|
|
assert.ok(this.loadedMore);
|
|
});
|
|
});
|