We used many global functions to handle tests when they should be imported like other libraries in our application. This also gets us closer to the way Ember CLI prefers our tests to be laid out.
26 lines
605 B
JavaScript
26 lines
605 B
JavaScript
import { test } from "qunit";
|
|
import I18n from "I18n";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
acceptance("Personal Message", {
|
|
loggedIn: true,
|
|
});
|
|
|
|
test("footer edit button", async (assert) => {
|
|
await visit("/t/pm-for-testing/12");
|
|
|
|
assert.ok(
|
|
!exists(".edit-message"),
|
|
"does not show edit first post button on footer by default"
|
|
);
|
|
});
|
|
|
|
test("suggested messages", async (assert) => {
|
|
await visit("/t/pm-for-testing/12");
|
|
|
|
assert.equal(
|
|
find("#suggested-topics .suggested-topics-title").text().trim(),
|
|
I18n.t("suggested_topics.pm_title")
|
|
);
|
|
});
|