DEV: re-enable tests following the timeout fix (#10410)
The 3 skipped tests are failing but not related to timeout
This commit is contained in:
parent
e64e6351bd
commit
510eaf9881
|
@ -3,7 +3,7 @@ import { acceptance } from "helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Click Track", {});
|
acceptance("Click Track", {});
|
||||||
|
|
||||||
QUnit.skip("Do not track mentions", async assert => {
|
QUnit.test("Do not track mentions", async assert => {
|
||||||
pretender.post("/clicks/track", () => assert.ok(false));
|
pretender.post("/clicks/track", () => assert.ok(false));
|
||||||
|
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
|
|
|
@ -67,11 +67,11 @@ QUnit.skip("tracks internal URLs", async assert => {
|
||||||
assert.notOk(track(generateClickEventOn("#same-site")));
|
assert.notOk(track(generateClickEventOn("#same-site")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track elements with no href", async assert => {
|
QUnit.test("does not track elements with no href", async assert => {
|
||||||
assert.ok(track(generateClickEventOn(".a-without-href")));
|
assert.ok(track(generateClickEventOn(".a-without-href")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track attachments", async assert => {
|
QUnit.test("does not track attachments", async assert => {
|
||||||
sandbox.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
|
sandbox.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
|
||||||
|
|
||||||
pretender.post("/clicks/track", () => assert.ok(false));
|
pretender.post("/clicks/track", () => assert.ok(false));
|
||||||
|
@ -119,39 +119,39 @@ QUnit.skip(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
QUnit.skip("does not track clicks on lightboxes", async assert => {
|
QUnit.test("does not track clicks on lightboxes", async assert => {
|
||||||
assert.notOk(track(generateClickEventOn(".lightbox")));
|
assert.notOk(track(generateClickEventOn(".lightbox")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track clicks when forcibly disabled", async assert => {
|
QUnit.test("does not track clicks when forcibly disabled", async assert => {
|
||||||
assert.notOk(track(generateClickEventOn(".no-track-link")));
|
assert.notOk(track(generateClickEventOn(".no-track-link")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track clicks on back buttons", async assert => {
|
QUnit.test("does not track clicks on back buttons", async assert => {
|
||||||
assert.notOk(track(generateClickEventOn(".back")));
|
assert.notOk(track(generateClickEventOn(".back")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track right clicks inside quotes", async assert => {
|
QUnit.test("does not track right clicks inside quotes", async assert => {
|
||||||
const event = generateClickEventOn(".quote a:first-child");
|
const event = generateClickEventOn(".quote a:first-child");
|
||||||
event.which = 3;
|
event.which = 3;
|
||||||
assert.ok(track(event));
|
assert.ok(track(event));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track clicks links in quotes", async assert => {
|
QUnit.test("does not track clicks links in quotes", async assert => {
|
||||||
User.currentProp("external_links_in_new_tab", true);
|
User.currentProp("external_links_in_new_tab", true);
|
||||||
assert.notOk(track(generateClickEventOn(".quote a:last-child")));
|
assert.notOk(track(generateClickEventOn(".quote a:last-child")));
|
||||||
assert.ok(window.open.calledWith("https://google.com", "_blank"));
|
assert.ok(window.open.calledWith("https://google.com", "_blank"));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track clicks on category badges", async assert => {
|
QUnit.test("does not track clicks on category badges", async assert => {
|
||||||
assert.notOk(track(generateClickEventOn(".hashtag")));
|
assert.notOk(track(generateClickEventOn(".hashtag")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not track clicks on mailto", async assert => {
|
QUnit.test("does not track clicks on mailto", async assert => {
|
||||||
assert.ok(track(generateClickEventOn(".mailto")));
|
assert.ok(track(generateClickEventOn(".mailto")));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("removes the href and put it as a data attribute", async assert => {
|
QUnit.test("removes the href and put it as a data attribute", async assert => {
|
||||||
User.currentProp("external_links_in_new_tab", true);
|
User.currentProp("external_links_in_new_tab", true);
|
||||||
|
|
||||||
assert.notOk(track(generateClickEventOn("a")));
|
assert.notOk(track(generateClickEventOn("a")));
|
||||||
|
@ -164,7 +164,7 @@ QUnit.skip("removes the href and put it as a data attribute", async assert => {
|
||||||
assert.ok(window.open.calledWith("http://www.google.com", "_blank"));
|
assert.ok(window.open.calledWith("http://www.google.com", "_blank"));
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("restores the href after a while", async assert => {
|
QUnit.test("restores the href after a while", async assert => {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
assert.notOk(track(generateClickEventOn("a")));
|
assert.notOk(track(generateClickEventOn("a")));
|
||||||
|
@ -184,7 +184,7 @@ function badgeClickCount(assert, id, expected) {
|
||||||
assert.equal(parseInt($badge.html(), 10), expected);
|
assert.equal(parseInt($badge.html(), 10), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
QUnit.skip("does not update badge clicks on my own link", async assert => {
|
QUnit.test("does not update badge clicks on my own link", async assert => {
|
||||||
sandbox
|
sandbox
|
||||||
.stub(User, "currentProp")
|
.stub(User, "currentProp")
|
||||||
.withArgs("id")
|
.withArgs("id")
|
||||||
|
@ -192,7 +192,7 @@ QUnit.skip("does not update badge clicks on my own link", async assert => {
|
||||||
badgeClickCount(assert, "with-badge", 1);
|
badgeClickCount(assert, "with-badge", 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("does not update badge clicks in my own post", async assert => {
|
QUnit.test("does not update badge clicks in my own post", async assert => {
|
||||||
sandbox
|
sandbox
|
||||||
.stub(User, "currentProp")
|
.stub(User, "currentProp")
|
||||||
.withArgs("id")
|
.withArgs("id")
|
||||||
|
@ -200,14 +200,14 @@ QUnit.skip("does not update badge clicks in my own post", async assert => {
|
||||||
badgeClickCount(assert, "with-badge-but-not-mine", 1);
|
badgeClickCount(assert, "with-badge-but-not-mine", 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("updates badge counts correctly", async assert => {
|
QUnit.test("updates badge counts correctly", async assert => {
|
||||||
badgeClickCount(assert, "inside-onebox", 1);
|
badgeClickCount(assert, "inside-onebox", 1);
|
||||||
badgeClickCount(assert, "inside-onebox-forced", 2);
|
badgeClickCount(assert, "inside-onebox-forced", 2);
|
||||||
badgeClickCount(assert, "with-badge", 2);
|
badgeClickCount(assert, "with-badge", 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
function testOpenInANewTab(description, clickEventModifier) {
|
function testOpenInANewTab(description, clickEventModifier) {
|
||||||
QUnit.skip(description, async assert => {
|
QUnit.test(description, async assert => {
|
||||||
var clickEvent = generateClickEventOn("a");
|
var clickEvent = generateClickEventOn("a");
|
||||||
clickEventModifier(clickEvent);
|
clickEventModifier(clickEvent);
|
||||||
assert.ok(track(clickEvent));
|
assert.ok(track(clickEvent));
|
||||||
|
|
Loading…
Reference in New Issue