mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
UX: Prevent category-drop topic count from wrapping to new line (#8943)
This commit is contained in:
@ -46,6 +46,21 @@ QUnit.test("undefined color", assert => {
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("topic count", assert => {
|
||||
const store = createStore();
|
||||
const category = store.createRecord("category", { name: "hello", id: 123 });
|
||||
|
||||
assert.equal(
|
||||
categoryBadgeHTML(category).indexOf("topic-count"),
|
||||
-1,
|
||||
"it does not include topic count by default"
|
||||
);
|
||||
assert.ok(
|
||||
categoryBadgeHTML(category, { topicCount: 20 }).indexOf("topic-count") > 20,
|
||||
"is included when specified"
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("allowUncategorized", assert => {
|
||||
const store = createStore();
|
||||
const uncategorized = store.createRecord("category", {
|
||||
|
Reference in New Issue
Block a user