[CLEANUP beta] Remove jQuery usage from ember-testing#19675
[CLEANUP beta] Remove jQuery usage from ember-testing#19675mixonic merged 1 commit intoemberjs:masterfrom
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! |
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
mixonic
left a comment
There was a problem hiding this comment.
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:
findfindWithAsserttriggerEventkeyEventclickfillInAll other helpers remain untouched for future official deprecation.
This is meant as a prerequisite to further jQuery cleanup, like removing the internaljQueryDisabledflag.Basically I am assuming that in 4.0jQueryDisabledis implicitly always true (similar to assumingJQUERY_INTEGRATIONis 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