DEV: uses hasNoErrors for field as used on form (#29154)

This commit simply ensures the API is similar for fields and form.
This commit is contained in:
Joffrey JAFFEUX
2024-10-10 17:57:06 +09:00
committed by GitHub
parent eb7fcf5d78
commit 9124d6ba5a
3 changed files with 5 additions and 5 deletions

View File

@@ -174,7 +174,7 @@ class FieldHelper {
.includesText(error, message);
}
hasNoError(message) {
hasNoErrors(message) {
this.context
.dom(this.element.querySelector(".form-kit__errors"))
.doesNotExist(message);

View File

@@ -53,7 +53,7 @@ module(
await fillIn("input", "0");
await formKit().submit();
assert.form().field("foo").hasNoError();
assert.form().field("foo").hasNoErrors();
});
}
);

View File

@@ -83,7 +83,7 @@ module("Integration | Component | FormKit | Form", function (hooks) {
await formKit().field("foo").fillIn("");
assert.form().field("foo").hasNoError();
assert.form().field("foo").hasNoErrors();
await formKit().submit();
@@ -96,7 +96,7 @@ module("Integration | Component | FormKit | Form", function (hooks) {
await formKit().field("foo").fillIn("t");
assert.form().field("foo").hasNoError();
assert.form().field("foo").hasNoErrors();
assert.form().field("bar").hasError("Required");
assert.form().hasErrors({
bar: "Required",
@@ -187,7 +187,7 @@ module("Integration | Component | FormKit | Form", function (hooks) {
await formKit().reset();
assert.form().field("foo").hasNoError("it resets the errors");
assert.form().field("foo").hasNoErrors("it resets the errors");
});
test("immutable by default", async function (assert) {