discourse/test/javascripts/widgets/actions-summary-test.js.es6
Robin Ward 31e100530f FEATURE: Flag count in post menu
This change shows a notification number besides the flag icon in the
post menu if there is reviewable content associated with the post.
Additionally, if there is pending stuff to review, the icon has a red
background.

We have also removed the list of links below a post with the flag
status. A reviewer is meant to click the number beside the flag icon to
view the flags. As a consequence of losing those links, we've removed
the ability to undo or ignore flags below a post.
2019-05-06 16:13:31 -04:00

25 lines
630 B
JavaScript

import { moduleForWidget, widgetTest } from "helpers/widget-test";
moduleForWidget("actions-summary");
widgetTest("post deleted", {
template: '{{mount-widget widget="actions-summary" args=args}}',
beforeEach() {
this.set("args", {
deleted_at: "2016-01-01",
deletedByUsername: "eviltrout",
deletedByAvatarTemplate: "/images/avatar.png"
});
},
test(assert) {
assert.ok(
find(".post-action .d-icon-far-trash-alt").length === 1,
"it has the deleted icon"
);
assert.ok(
find(".avatar[title=eviltrout]").length === 1,
"it has the deleted by avatar"
);
}
});