discourse/test/javascripts/widgets/actions-summary-test.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
632 B
JavaScript
Raw Normal View History

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