FEATURE: Special call-out for new / returning posters. (#7115)

This commit is contained in:
Dan Ungureanu
2019-03-08 10:48:35 +02:00
committed by GitHub
parent 65464969cd
commit 35942f7c7c
14 changed files with 174 additions and 1 deletions

View File

@@ -852,3 +852,22 @@ widgetTest("pm map", {
assert.equal(find(".private-message-map .user").length, 1);
}
});
widgetTest("post notice", {
template: '{{mount-widget widget="post" args=args}}',
beforeEach() {
this.set("args", {
postNoticeType: "returning",
postNoticeTime: new Date("2010-01-01 12:00:00 UTC"),
username: "codinghorror"
});
},
test(assert) {
assert.equal(
find(".post-notice")
.text()
.trim(),
I18n.t("post.notice.return", { user: "codinghorror", time: "Jan '10" })
);
}
});