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 assigneeElements = [];
const assignedHtml = (username, path) => { const assignedHtml = (username, path, type) => {
return `<span class="assigned-to">${htmlSafe( return `<span class="assigned-to--${type}">${htmlSafe(
I18n.t("discourse_assign.assigned_topic_to", { I18n.t("discourse_assign.assigned_topic_to", {
username, username,
path, path,
@ -718,7 +718,8 @@ function initialize(api) {
new RawHtml({ new RawHtml({
html: assignedHtml( html: assignedHtml(
assignedToUser.username, assignedToUser.username,
assignedToUserPath(assignedToUser) assignedToUserPath(assignedToUser),
"user"
), ),
}) })
) )
@ -731,7 +732,8 @@ function initialize(api) {
new RawHtml({ new RawHtml({
html: assignedHtml( html: assignedHtml(
assignedToGroup.name, 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" "shows assignment in the header"
); );
assert.strictEqual( assert.strictEqual(
query("#post_1 .assigned-to").innerText.trim(), query("#post_1 .assigned-to--group").innerText.trim(),
"Assigned topic to Developers", "Assigned topic to Developers",
"shows assignment in the first post" "shows assignment in the first post"
); );