emberjs / ember-test-helpers

Test-framework-agnostic helpers for testing Ember.js applications
Apache License 2.0
188 stars 254 forks source link

Read "maxlength" attribute instead of "maxLength" in "-guard-for-maxlength.ts" #1459

Closed shubham88fru closed 1 month ago

shubham88fru commented 1 month ago

I had opened this a while back but didn't end up creating a PR.

background: The following piece of code in "-guard-for-maxlength.ts" reads "maxLength" (camelcase") attribute instead of "maxlength" (lowercase) https://github.com/emberjs/ember-test-helpers/blob/3b83f12656ab9443603da79575ab8a744d56fcb9/addon/addon-test-support/%40ember/test-helpers/dom/-guard-for-maxlength.ts#L22

As per this MDN document, the actual attribute is "maxlength" (lowercase) and NOT "maxLength" (camel case).

In fact, in the same file, few lines below, the following line of code does this correctly. https://github.com/emberjs/ember-test-helpers/blob/3b83f12656ab9443603da79575ab8a744d56fcb9/addon/addon-test-support/%40ember/test-helpers/dom/-guard-for-maxlength.ts#L41

I think, this should be fixed for consistency and correctness. Please let me know if I can work on this and can create a PR.

Thanks.

shubham88fru commented 1 month ago

@rwjblue @kategengler - I'd be happy to do this change as my first contribution to open source. Please have a look.

shubham88fru commented 1 month ago

@NullVoxPopuli - created PR for this change.