mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
fix category-row regressions
This commit is contained in:
parent
ff9d7a9bfb
commit
15aa712227
@ -82,6 +82,8 @@ export default SelectKitRowComponent.extend({
|
||||
|
||||
@computed("category.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();
|
||||
|
||||
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(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').rows().length, 2);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user