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:
Roman Rizzi
2022-11-02 10:41:30 -03:00
committed by GitHub
parent e7e24843dc
commit 0a5f548635
697 changed files with 61642 additions and 40 deletions

View File

@ -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")
);
});
}
);