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