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,11 +6,11 @@ componentTest("icon only button", {
test(assert) {
assert.ok(
this.$("button.btn.btn-icon.no-text").length,
find("button.btn.btn-icon.no-text").length,
"it has all the classes"
);
assert.ok(this.$("button .d-icon.d-icon-plus").length, "it has the icon");
assert.equal(this.$("button").attr("tabindex"), "3", "it has the tabindex");
assert.ok(find("button .d-icon.d-icon-plus").length, "it has the icon");
assert.equal(find("button").attr("tabindex"), "3", "it has the tabindex");
}
});
@ -19,11 +19,11 @@ componentTest("icon and text button", {
test(assert) {
assert.ok(
this.$("button.btn.btn-icon-text").length,
find("button.btn.btn-icon-text").length,
"it has all the classes"
);
assert.ok(this.$("button .d-icon.d-icon-plus").length, "it has the icon");
assert.ok(this.$("button span.d-button-label").length, "it has the label");
assert.ok(find("button .d-icon.d-icon-plus").length, "it has the icon");
assert.ok(find("button span.d-button-label").length, "it has the label");
}
});
@ -31,8 +31,8 @@ componentTest("text only button", {
template: '{{d-button label="topic.create"}}',
test(assert) {
assert.ok(this.$("button.btn.btn-text").length, "it has all the classes");
assert.ok(this.$("button span.d-button-label").length, "it has the label");
assert.ok(find("button.btn.btn-text").length, "it has all the classes");
assert.ok(find("button span.d-button-label").length, "it has the label");
}
});