2020-03-02 14:24:31 -05:00
|
|
|
import pretender from "helpers/create-pretender";
|
2019-05-06 12:28:03 -04:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Click Track", {});
|
|
|
|
|
2020-08-11 03:09:21 -04:00
|
|
|
QUnit.test("Do not track mentions", async (assert) => {
|
2020-03-02 14:24:31 -05:00
|
|
|
pretender.post("/clicks/track", () => assert.ok(false));
|
2019-05-06 12:28:03 -04:00
|
|
|
|
|
|
|
await visit("/t/internationalization-localization/280");
|
2020-08-14 08:57:28 -04:00
|
|
|
assert.ok(find(".user-card.show").length === 0, "card should not appear");
|
2019-05-06 12:28:03 -04:00
|
|
|
|
|
|
|
await click("article[data-post-id=3651] a.mention");
|
2020-08-14 08:57:28 -04:00
|
|
|
assert.ok(find(".user-card.show").length === 1, "card appear");
|
2019-05-06 12:28:03 -04:00
|
|
|
assert.equal(currentURL(), "/t/internationalization-localization/280");
|
|
|
|
});
|