mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:03:22 +08:00
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", {});
|
||||
|
||||
QUnit.skip("Do not track mentions", async assert => {
|
||||
QUnit.test("Do not track mentions", async assert => {
|
||||
pretender.post("/clicks/track", () => assert.ok(false));
|
||||
|
||||
await visit("/t/internationalization-localization/280");
|
||||
|
|
|
@ -67,11 +67,11 @@ QUnit.skip("tracks internal URLs", async assert => {
|
|||
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")));
|
||||
});
|
||||
|
||||
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");
|
||||
|
||||
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")));
|
||||
});
|
||||
|
||||
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")));
|
||||
});
|
||||
|
||||
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")));
|
||||
});
|
||||
|
||||
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");
|
||||
event.which = 3;
|
||||
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);
|
||||
assert.notOk(track(generateClickEventOn(".quote a:last-child")));
|
||||
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")));
|
||||
});
|
||||
|
||||
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")));
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
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"));
|
||||
});
|
||||
|
||||
QUnit.skip("restores the href after a while", async assert => {
|
||||
QUnit.test("restores the href after a while", async assert => {
|
||||
assert.expect(2);
|
||||
|
||||
assert.notOk(track(generateClickEventOn("a")));
|
||||
|
@ -184,7 +184,7 @@ function badgeClickCount(assert, id, 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
|
||||
.stub(User, "currentProp")
|
||||
.withArgs("id")
|
||||
|
@ -192,7 +192,7 @@ QUnit.skip("does not update badge clicks on my own link", async assert => {
|
|||
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
|
||||
.stub(User, "currentProp")
|
||||
.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);
|
||||
});
|
||||
|
||||
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-forced", 2);
|
||||
badgeClickCount(assert, "with-badge", 2);
|
||||
});
|
||||
|
||||
function testOpenInANewTab(description, clickEventModifier) {
|
||||
QUnit.skip(description, async assert => {
|
||||
QUnit.test(description, async assert => {
|
||||
var clickEvent = generateClickEventOn("a");
|
||||
clickEventModifier(clickEvent);
|
||||
assert.ok(track(clickEvent));
|
||||
|
|
Loading…
Reference in New Issue
Block a user