DEV: Add test for click-track and mention links.

DEV: Add test for click-track and mention links.

Follow-up to b81d169e.

diff --git a/test/javascripts/acceptance/click-track-test.js.es6 b/test/javascripts/acceptance/click-track-test.js.es6
new file mode 100644
index 0000000..ddbb435
--- /dev/null
+++ b/test/javascripts/acceptance/click-track-test.js.es6
@@ -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");
+});

GitHub sha: 39260c84

1 Like