FIX: Groups post page was broken.

Also added integration tests so we don't miss this breaking in the
future.
This commit is contained in:
Robin Ward 2015-01-23 11:13:27 -05:00
parent 848d60d459
commit 2ea4c1c9de
4 changed files with 20 additions and 3 deletions

View File

@ -32,7 +32,7 @@ export function categoryBadgeHTML(category, opts) {
var html = ""; var html = "";
var parentCat = Discourse.Category.findById(category.get('parent_category_id')); var parentCat = Discourse.Category.findById(get(category, 'parent_category_id'));
if (opts.hideParent) { parentCat = null; } if (opts.hideParent) { parentCat = null; }
html += categoryStripe(tagName, parentCat, extraClasses, href); html += categoryStripe(tagName, parentCat, extraClasses, href);

View File

@ -4,7 +4,7 @@
<th colspan="3" class="seen">{{i18n 'last_seen'}}</th> <th colspan="3" class="seen">{{i18n 'last_seen'}}</th>
</tr> </tr>
{{#each m in members}} {{#each m in members}}
<tr> <tr>
<td class='avatar'> <td class='avatar'>
{{avatar m imageSize="large"}} {{avatar m imageSize="large"}}
</td> </td>
@ -16,7 +16,6 @@
<span class='last-seen-at'>{{bound-date m.last_seen_at}}</span> <span class='last-seen-at'>{{bound-date m.last_seen_at}}</span>
</td> </td>
</tr> </tr>
</div>
{{/each}} {{/each}}
</table> </table>
{{/if}} {{/if}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,12 @@
integration("Groups");
test("Browsing Groups", function() {
visit("/groups/discourse");
andThen(function() {
ok(count('.user-stream .item') > 0, "it has stream items");
});
visit("/groups/discourse/members");
andThen(function() {
ok(count('.group-members tr') > 0, "it lists group members");
});
});