mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FIX: Skip attachments in click track.
This commit is contained in:
@ -70,13 +70,13 @@ QUnit.test("does not track elements with no href", async assert => {
|
||||
});
|
||||
|
||||
QUnit.test("does not track attachments", async assert => {
|
||||
assert.expect(1);
|
||||
sandbox.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
|
||||
|
||||
/* global server */
|
||||
server.post("/clicks/track", () => assert.ok(false));
|
||||
|
||||
assert.ok(track(generateClickEventOn(".attachment")));
|
||||
assert.notOk(track(generateClickEventOn(".attachment")));
|
||||
assert.ok(DiscourseURL.redirectTo.calledWith("http://discuss.domain.com/uploads/default/1234/1532357280.txt"));
|
||||
});
|
||||
|
||||
QUnit.test("tracks external URLs", async assert => {
|
||||
|
Reference in New Issue
Block a user