mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 02:19:39 +08:00

This structure is closer to how ember-cli expects tests to be placed. It is not their final position, just the first step towards it.
21 lines
628 B
JavaScript
21 lines
628 B
JavaScript
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
|
|
|
moduleForWidget("small-user-list");
|
|
|
|
widgetTest("renders avatars and support for unknown", {
|
|
template: '{{mount-widget widget="small-user-list" args=args}}',
|
|
beforeEach() {
|
|
this.set("args", {
|
|
users: [
|
|
{ id: 456, username: "eviltrout" },
|
|
{ id: 457, username: "someone", unknown: true },
|
|
],
|
|
});
|
|
},
|
|
async test(assert) {
|
|
assert.ok(find("[data-user-card=eviltrout]").length === 1);
|
|
assert.ok(find("[data-user-card=someone]").length === 0);
|
|
assert.ok(find(".unknown").length, "includes unkown user");
|
|
},
|
|
});
|