-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
typeIn helper forces maximum length check #1008
Comments
I'm surprised to hear about I've just tried: <input type="time" maxlength="1" />
<input type="date" maxlength="1" /> and seems neither of |
This is relating to using a text input for time / date, vs the native |
I think opting out the ember-test-helpers/addon-test-support/@ember/test-helpers/dom/type-in.ts Lines 114 to 123 in d1a05f4
Othewise, if only bypass the guard, test-helpers would do something that a regular user can not do. |
just wondering if it's reasonable to test this "type-in despite |
I actually contributed the original It seems like a lot of additional things have been added that detract from the original use case. I'm not sure what the way forward is, but we won't be able to update our project to the 5.x version until we come up with something. |
I participated in adding a hard error for the In general, I think, bypassing the check conditionally is a wrong path to go, cause it complicates the For instance, instead of a hard error, From the other hand, it might be reasonable to just recommend using At this point, w/o an example of your use case, it's hard reason about of what's wrong, and what should be fixed. Specifically, I think it can be helpful to know how/if does your component rely on the |
My example as mentioned above is an input that is used for date / time input. It's a plain If a user types So it's 'valid' to type more characters than are allowed by I don't want to use |
Thank you for the explanation! Yes, I can see how a manual mix of the In my opinion, we should relax the @rwjblue what do you think? |
Hmm, ya that seems reasonable @ro0gr |
When working with date / time inputs, it's sometimes desired behaviour to allow a user to keep typing beyond the
maxlength
attribute, for example wrapping a time or date input.When upgrading to test helpers recently we've seen a lot of failing tests because a new check has been added to the
typeIn
helper. Whilst it seem well-intentioned, not providing a way to opt out of this behaviour adds a limitation that isn't necessarily what is desired.Could I add a flag to opt out of maxlength checking?
The text was updated successfully, but these errors were encountered: