2016-01-04 15:18:09 -05:00
|
|
|
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
|
|
|
|
|
|
|
moduleForWidget("actions-summary");
|
|
|
|
|
|
|
|
widgetTest("post deleted", {
|
|
|
|
template: '{{mount-widget widget="actions-summary" args=args}}',
|
2017-06-14 13:57:58 -04:00
|
|
|
beforeEach() {
|
2016-01-04 15:18:09 -05:00
|
|
|
this.set("args", {
|
2016-03-03 11:40:35 -05:00
|
|
|
deleted_at: "2016-01-01",
|
2016-01-04 15:18:09 -05:00
|
|
|
deletedByUsername: "eviltrout",
|
|
|
|
deletedByAvatarTemplate: "/images/avatar.png"
|
|
|
|
});
|
|
|
|
},
|
|
|
|
test(assert) {
|
2017-11-23 12:15:37 -05:00
|
|
|
assert.ok(
|
2019-02-25 10:04:55 -05:00
|
|
|
find(".post-action .d-icon-far-trash-alt").length === 1,
|
2017-11-23 12:15:37 -05:00
|
|
|
"it has the deleted icon"
|
|
|
|
);
|
2016-01-04 15:18:09 -05:00
|
|
|
assert.ok(
|
2019-02-25 10:04:55 -05:00
|
|
|
find(".avatar[title=eviltrout]").length === 1,
|
2016-01-04 15:18:09 -05:00
|
|
|
"it has the deleted by avatar"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|