mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
DEV: Add test for 8aff99761ae.
This commit is contained in:
@ -16,6 +16,24 @@ widgetTest("basic elements", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
widgetTest("post - links", {
|
||||||
|
template: '{{mount-widget widget="post-contents" args=args}}',
|
||||||
|
beforeEach() {
|
||||||
|
this.set("args", {
|
||||||
|
cooked:
|
||||||
|
"<a href='http://link1.example.com/'>first link</a> and <a href='http://link2.example.com/?some=query'>second link</a>",
|
||||||
|
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", {
|
widgetTest("wiki", {
|
||||||
template:
|
template:
|
||||||
'{{mount-widget widget="post" args=args showHistory=(action "showHistory")}}',
|
'{{mount-widget widget="post" args=args showHistory=(action "showHistory")}}',
|
||||||
|
Reference in New Issue
Block a user