mirror of
https://github.com/discourse/discourse.git
synced 2025-06-14 14:50:40 +08:00
DEV: Add test for click-track and mention links.
Follow-up to b81d169e.
This commit is contained in:
15
test/javascripts/acceptance/click-track-test.js.es6
Normal file
15
test/javascripts/acceptance/click-track-test.js.es6
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { acceptance } from "helpers/qunit-helpers";
|
||||||
|
|
||||||
|
acceptance("Click Track", {});
|
||||||
|
|
||||||
|
QUnit.test("Do not track mentions", async assert => {
|
||||||
|
/* global server */
|
||||||
|
server.get("/clicks/track", () => assert.ok(false));
|
||||||
|
|
||||||
|
await visit("/t/internationalization-localization/280");
|
||||||
|
assert.ok(invisible("#user-card"), "card should not appear");
|
||||||
|
|
||||||
|
await click("article[data-post-id=3651] a.mention");
|
||||||
|
assert.ok(visible("#user-card"), "card should appear");
|
||||||
|
assert.equal(currentURL(), "/t/internationalization-localization/280");
|
||||||
|
});
|
Reference in New Issue
Block a user