mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:41:07 +08:00
DEV: uses find() helper instead of this.$() in js tests (#7062)
This commit is contained in:
@ -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"
|
||||
);
|
||||
|
Reference in New Issue
Block a user