From e32af7fb0fdcf04e36a74b4aa49c079c7d1a42df Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Sun, 31 Mar 2019 15:09:30 +0300 Subject: [PATCH] DEV: Add test for 8aff99761ae. --- test/javascripts/widgets/post-test.js.es6 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/javascripts/widgets/post-test.js.es6 b/test/javascripts/widgets/post-test.js.es6 index 8f205591a01..9dc9754aa46 100644 --- a/test/javascripts/widgets/post-test.js.es6 +++ b/test/javascripts/widgets/post-test.js.es6 @@ -16,6 +16,24 @@ widgetTest("basic elements", { } }); +widgetTest("post - links", { + template: '{{mount-widget widget="post-contents" args=args}}', + beforeEach() { + this.set("args", { + cooked: + "first link and second link", + linkCounts: [ + { url: "http://link1.example.com/", clicks: 1, internal: true }, + { url: "http://link2.example.com/", clicks: 2, internal: true } + ] + }); + }, + async test(assert) { + assert.equal(find(".badge.clicks:nth(0)").text(), "1"); + assert.equal(find(".badge.clicks:nth(1)").text(), "2"); + } +}); + widgetTest("wiki", { template: '{{mount-widget widget="post" args=args showHistory=(action "showHistory")}}',