mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
This commit introduces <NotificationsTracking /> which is a wrapper component around <DMenu /> which replaces the select-kit component <TopicNotificationsButton />. Each tracking case has its dedicated component: - topic -> `<TopicNotificationsTracking />` - group -> `<GroupNotificationsTracking />` - tag -> `<TagNotificationsTracking />` - category -> `<CategoryNotificationsTracking />` - chat thread -> `<ThreadNotificationsTracking />`
28 lines
792 B
JavaScript
28 lines
792 B
JavaScript
import { visit } from "@ember/test-helpers";
|
|
import { test } from "qunit";
|
|
import notificationsTracking from "discourse/tests/helpers/notifications-tracking-helper";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
acceptance("Topic Notifications button", function (needs) {
|
|
needs.user();
|
|
|
|
needs.pretender((server, helper) => {
|
|
server.post("/t/280/notifications", () => {
|
|
return helper.response({});
|
|
});
|
|
});
|
|
|
|
test("Updating topic notification level", async function (assert) {
|
|
await visit("/t/internationalization-localization/280");
|
|
|
|
await notificationsTracking().selectLevelId(3);
|
|
|
|
assert
|
|
.notificationsTracking()
|
|
.hasSelectedLevelName(
|
|
"watching",
|
|
"displays the right notification level"
|
|
);
|
|
});
|
|
});
|