* Running the tests only in the ember cli env hid the fact that the pending posts feature wasn't working in the legacy environment * Tests were using ember-cli-only APIs while there are widely used testing APIs in Discourse that support both ember envs * `ember-test-selectors` was in both dependencies and devDependencies in discourse/package.json * `qunit-dom` in package.json was not only unused but also defunct, as it wasn't pulled into the legacy env app A followup to #14501, and #15128.
19 lines
608 B
JavaScript
19 lines
608 B
JavaScript
import { discourseModule, query } from "discourse/tests/helpers/qunit-helpers";
|
|
import componentTest, {
|
|
setupRenderingTest,
|
|
} from "discourse/tests/helpers/component-test";
|
|
import hbs from "htmlbars-inline-precompile";
|
|
|
|
discourseModule("Integration | Component | empty-state", function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
componentTest("it renders", {
|
|
template: hbs`<EmptyState @title="title" @body="body" />`,
|
|
|
|
test(assert) {
|
|
assert.strictEqual(query("[data-test-title]").textContent, "title");
|
|
assert.strictEqual(query("[data-test-body]").textContent, "body");
|
|
},
|
|
});
|
|
});
|