class for assign message, test fix

This commit is contained in:
awesomerobot 2023-03-13 16:46:21 -04:00
parent b4c99e0fed
commit a846bd3585
2 changed files with 7 additions and 5 deletions

View File

@ -702,8 +702,8 @@ function initialize(api) {
];
const assigneeElements = [];
const assignedHtml = (username, path) => {
return `<span class="assigned-to">${htmlSafe(
const assignedHtml = (username, path, type) => {
return `<span class="assigned-to--${type}">${htmlSafe(
I18n.t("discourse_assign.assigned_topic_to", {
username,
path,
@ -718,7 +718,8 @@ function initialize(api) {
new RawHtml({
html: assignedHtml(
assignedToUser.username,
assignedToUserPath(assignedToUser)
assignedToUserPath(assignedToUser),
"user"
),
})
)
@ -731,7 +732,8 @@ function initialize(api) {
new RawHtml({
html: assignedHtml(
assignedToGroup.name,
assignedToGroupPath(assignedToGroup)
assignedToGroupPath(assignedToGroup),
"group"
),
})
)

View File

@ -136,7 +136,7 @@ acceptance("Discourse Assign | Assigned topic", function (needs) {
"shows assignment in the header"
);
assert.strictEqual(
query("#post_1 .assigned-to").innerText.trim(),
query("#post_1 .assigned-to--group").innerText.trim(),
"Assigned topic to Developers",
"shows assignment in the first post"
);