mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
DEV: Move discourse-chat
to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
This commit is contained in:
@ -0,0 +1,31 @@
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import pretender, { response } from "discourse/tests/helpers/create-pretender";
|
||||
import I18n from "I18n";
|
||||
|
||||
module(
|
||||
"Integration | Component | user-menu | chat-notifications-list",
|
||||
function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
hooks.beforeEach(() => {
|
||||
pretender.get("/notifications", () => {
|
||||
return response({ notifications: [] });
|
||||
});
|
||||
});
|
||||
|
||||
const template = hbs`<UserMenu::ChatNotificationsList/>`;
|
||||
|
||||
test("empty state when there are no notifications", async function (assert) {
|
||||
await render(template);
|
||||
assert.ok(exists(".empty-state .empty-state-body"));
|
||||
assert.strictEqual(
|
||||
query(".empty-state .empty-state-title").textContent.trim(),
|
||||
I18n.t("user_menu.no_chat_notifications_title")
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user