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

@ -6,13 +6,13 @@ componentTest("with image", {
async test(assert) {
assert.equal(
this.$(".d-icon-far-image").length,
find(".d-icon-far-image").length,
1,
"it displays the upload icon"
);
assert.equal(
this.$(".d-icon-far-trash-alt").length,
find(".d-icon-far-trash-alt").length,
1,
"it displays the trash icon"
);
@ -32,19 +32,19 @@ componentTest("without image", {
test(assert) {
assert.equal(
this.$(".d-icon-far-image").length,
find(".d-icon-far-image").length,
1,
"it displays the upload icon"
);
assert.equal(
this.$(".d-icon-far-trash-alt").length,
find(".d-icon-far-trash-alt").length,
0,
"it does not display trash icon"
);
assert.equal(
this.$(".image-uploader-lightbox-btn").length,
find(".image-uploader-lightbox-btn").length,
0,
"it does not display the button to open image lightbox"
);