mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: ensures category is rendered (#30988)
https://github.com/discourse/discourse/pull/30962 lost the rendering of category in topic-label-content. This commit fixes it and adds a test to ensure we render category and tags.
This commit is contained in:
parent
a1bbbbda02
commit
7ea2d3efe1
@ -42,7 +42,7 @@ const TopicLabelButton = <template>
|
||||
</span>
|
||||
</div>
|
||||
<div class="topic-title__bottom-line">
|
||||
{{categoryLinkHTML @topic (hash link=false)}}
|
||||
{{categoryLinkHTML @topic.category (hash link=false)}}
|
||||
{{discourseTags @topic}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -397,18 +397,28 @@ acceptance("Composer", function (needs) {
|
||||
".d-editor-input",
|
||||
"this is the content for a different topic"
|
||||
);
|
||||
|
||||
await visit("/t/1-3-0beta9-no-rate-limit-popups/28830");
|
||||
|
||||
assert.strictEqual(
|
||||
currentURL(),
|
||||
"/t/1-3-0beta9-no-rate-limit-popups/28830"
|
||||
);
|
||||
await click("#reply-control button.create");
|
||||
assert.dom(".reply-where-modal").exists("pops up a modal");
|
||||
|
||||
assert.dom(".topic-title").exists({ count: 2 }); // modal buttons
|
||||
await click("#reply-control button.create");
|
||||
|
||||
assert.dom(".reply-where-modal").exists("pops up a modal");
|
||||
assert
|
||||
.dom(".topic-title")
|
||||
.exists({ count: 2 }, "it renders the two topics");
|
||||
assert
|
||||
.dom(".btn-reply-where:nth-of-type(1) .badge-category__name")
|
||||
.hasText("test too", "it renders the category name");
|
||||
assert
|
||||
.dom(".btn-reply-where:nth-of-type(2) .discourse-tags")
|
||||
.hasText("foo", "it renders the tags");
|
||||
|
||||
await click(".btn-reply-here");
|
||||
|
||||
assert
|
||||
.dom(".topic-post:last-of-type .cooked p")
|
||||
.hasText(
|
||||
|
@ -4005,7 +4005,7 @@ export default {
|
||||
chunk_size: 20,
|
||||
bookmarked: null,
|
||||
bookmarks: [],
|
||||
tags: null,
|
||||
tags: ["foo"],
|
||||
},
|
||||
"/t/9/1.json": {
|
||||
post_stream: {
|
||||
|
Loading…
Reference in New Issue
Block a user