-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(material/form-field): add error harness #25698
Conversation
d890253
to
bbed76e
Compare
bbed76e
to
47f90fc
Compare
297590b
to
69ecbe8
Compare
The existing form field harness has |
ohh, that makes it questionable if it should be a separate harness (like in this PR) or if we should encourage the existing methods. I didn't realize we have these- good point. |
There's a lot of internal apps that use MatError without using the form field. Whether or not they should is maybe a good thing to discuss, but right now there's no way to get these folks using a test harness to check MatError. |
I'm not sure if we would get much benefit out of switching those apps to harnesses since |
The benefit here is making sure there is consistency with guiding our users to use harnesses with our components. Otherwise we need to special-case "mat-error" in our lint rule, or in our docs, with some reason about why we wouldn't provide one for it. It would have been better if we failed when |
Would it make sense to add this harness, but mark it as deprecated so people know to go through the form field one? |
I'm in favor of deprecating it if we can get users off It's really just an element with |
I'm fine going with this approach. Two things/questions:
|
69ecbe8
to
20b06b8
Compare
|
20b06b8
to
f000639
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Add an error harness for client tests checking whether there are certain errors on the page. This is very common internally for tests checking validation.
The harness can be retrieved directly or through the form field.
I tried to check the right inheritance structure of other harnesses - might have gotten something mixed up on the way. Would appreciate a review making sure I've got the right inheritance of things. The harness tests passed so that's a good sign.