mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:41:03 +08:00
fix category-row regressions
This commit is contained in:
@ -82,6 +82,8 @@ export default SelectKitRowComponent.extend({
|
|||||||
|
|
||||||
@computed("category.description")
|
@computed("category.description")
|
||||||
description(description) {
|
description(description) {
|
||||||
return `${description.substr(0, 200)}${description.length > 200 ? '…' : ''}`;
|
if (description) {
|
||||||
|
return `${description.substr(0, 200)}${description.length > 200 ? '…' : ''}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -35,9 +35,9 @@ componentTest('with scopedCategoryId', {
|
|||||||
this.get('subject').expand();
|
this.get('subject').expand();
|
||||||
|
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(this.get('subject').rowByIndex(0).title(), 'feature');
|
assert.equal(this.get('subject').rowByIndex(0).title(), 'Discussion about features or potential features of Discourse: how they work, why they work, etc.');
|
||||||
assert.equal(this.get('subject').rowByIndex(0).value(), 2);
|
assert.equal(this.get('subject').rowByIndex(0).value(), 2);
|
||||||
assert.equal(this.get('subject').rowByIndex(1).title(), 'spec');
|
assert.equal(this.get('subject').rowByIndex(1).title(), 'My idea here is to have mini specs for features we would like built but have no bandwidth to build');
|
||||||
assert.equal(this.get('subject').rowByIndex(1).value(), 26);
|
assert.equal(this.get('subject').rowByIndex(1).value(), 26);
|
||||||
assert.equal(this.get('subject').rows().length, 2);
|
assert.equal(this.get('subject').rows().length, 2);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user