DEV: replaces topic-notifications-options by DMenu (#30298)

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 />`
This commit is contained in:
Joffrey JAFFEUX
2024-12-16 19:59:18 +01:00
committed by GitHub
parent 062e4fb4f3
commit 41df705188
38 changed files with 565 additions and 289 deletions

View File

@ -3,7 +3,7 @@ import { render } from "@ember/test-helpers";
import { hbs } from "ember-cli-htmlbars";
import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import notificationsTracking from "discourse/tests/helpers/notifications-tracking-helper";
import AutomationFabricators from "discourse/plugins/automation/admin/lib/fabricators";
module(
@ -23,9 +23,7 @@ module(
await render(
hbs`<AutomationField @automation={{this.automation}} @field={{this.field}} />`
);
await selectKit().expand();
await selectKit().selectRowByValue(2);
await notificationsTracking().selectLevelId(2);
assert.strictEqual(this.field.metadata.value, 2);
});