-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[CLEANUP beta] Remove jQuery usage from ember-testing #19675
Conversation
8efcb80
to
6e00ef3
Compare
Hm, @simonihmig I believe the testing APIs should be removed if they are now always erring. They are replaced by https://github.com/emberjs/ember-test-helpers. If that is acceptable for API that error, I think another question is what happens to all the non-erroring helpers offered in the same manner. Those might need deprecation targeting 5.0 removal. I'll add this to our framework discussion Friday. |
@simonihmig We discussed this with framework core. The group agreed that any testing APIs that were reliant on jQuery should simply be removed in 4.0. If there are testing APIs that do not reference jQuery, they should remain. Separately we could work on deprecating those, but it would target 5.0 at this point. |
6e00ef3
to
cc749ef
Compare
@mixonic Did that now! See the PR's updated description. Ready for review then! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wonderful!!
As advised by feedback from core team, this removes all jQuery related testing helpers from ember-testing: * `find` * `findWithAssert` * `triggerEvent` * `keyEvent` * `click` * `fillIn` All remaining helpers remain untouched for future official deprecation.
cc749ef
to
c2b9023
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed an amended PR which drops changes to the yarn.lock
file that I believe were unrelated.
Oh, didn't notice, thanks! I believe that happened to me more than once, idk why, maybe different versions of |
As advised by feedback from core team, this removes all jQuery related testing helpers from ember-testing, along with related utilities (event stuff) and tests:
find
findWithAssert
triggerEvent
keyEvent
click
fillIn
All other helpers remain untouched for future official deprecation.
This is meant as a prerequisite to further jQuery cleanup, like removing the internaljQueryDisabled
flag.Basically I am assuming that in 4.0jQueryDisabled
is implicitly always true (similar to assumingJQUERY_INTEGRATION
is always false). So here I am basically doing manual dead code elimination. However that means:ember-testing'sfind()
is always throwing an assertion now, and as such probably most other helpers that internally usefind()
?some test suites have been completely removed, as all of it was wrapped inif (!jQueryDisabled) { ... }
(so under that above assumption that isif (false) {}
now)Note sure how this whole package was meant to migrate to 4.0, so please provide advice. AFAIK the legacy testing API's (before@ember/test-helpers
) weren't formally deprecated, were they? But nowadays without jQuery, they seem not even usable anymore?/cc @rwjblue