DEV: uses find() helper instead of this.$() in js tests (#7062)

This commit is contained in:
Joffrey JAFFEUX
2019-02-25 16:04:55 +01:00
committed by GitHub
parent c0dd171cf1
commit 5952a6c0ad
22 changed files with 332 additions and 318 deletions

View File

@ -23,7 +23,7 @@ widgetTest("duplicate links", {
},
test(assert) {
assert.equal(
this.$(".post-links a.track-link").length,
find(".post-links a.track-link").length,
1,
"it hides the dupe link"
);
@ -47,8 +47,8 @@ widgetTest("collapsed links", {
});
},
async test(assert) {
assert.ok(this.$(".expand-links").length === 1, "collapsed by default");
assert.ok(find(".expand-links").length === 1, "collapsed by default");
await click("a.expand-links");
assert.equal(this.$(".post-links a.track-link").length, 7);
assert.equal(find(".post-links a.track-link").length, 7);
}
});