-
Notifications
You must be signed in to change notification settings - Fork 27.4k
test(jQuery): test not firing $destroy on jQuery.cleanData with jQuery UI #8695
Conversation
I verified that if the patch is modified to mess with Angular by changing the value of the internal The (expected) failure I'm talking about is as follows:
Apply this PR to commit c306bc2 and add the following line:
the the |
Anyway, this got me interested as it seems that now even if I removed this whole logic of not triggering |
I think (I haven't verified this) that the tests now pass because of a change that caused element transclusion not to register a listener on the transcluded element. The relevant change: b5f7970 I would suggest writing a test that explicitly puts data on the DOM rather than relies on a behavior of other directives which can change at any time. |
OK, I'll look into this. |
02dc2aa
to
fd2d6c0
Compare
8292c21
to
7b9fddf
Compare
@IgorMinar I'll look into it this weekend. |
4dd5a20
to
998c61c
Compare
@petebacondarwin Sure! |
#12094 landed last November, how does this affect this PR? |
Is this still relevant? |
Three years later, PR rebased. :) Yes, @Narretz, it's still relevant. Fortunately, the tests still pass and I could even enable them in jqLite as well now that jqLite implements the |
…y UI So far it wasn't tested that Angular's logic for skipping it triggering the $destroy event on jQuery.cleanData in the replaceWith internal function works correctly when Angular is not the last one to patch the cleanData method (e.g. if jQuery UI does the patching later). This commits adds the relevant test. Ref angular#8486
The tests fail on jqLite when I enabled those I think the current implementation of jqLite where it doesn't use |
The previous implementation of jqLite didn't use cleanData from the jqLite object but instead used a cached version which maede it impossible to monkey-patch jqLite.cleanData similarly to how you can do it in jQuery. This commit enables one of the tests so far run only with jQuery to run with jqLite as well. Ref angular#8486 Ref angular#8695
The previous implementation of jqLite didn't use cleanData from the jqLite object but instead used a cached version which maede it impossible to monkey-patch jqLite.cleanData similarly to how you can do it in jQuery. The cleanData method is not meant to be called directly by userland code; its purpose is mainly to be able to be monkey-patched; therefore, the previous implementation didn't make a lot of sense. This commit enables one of the tests so far run only with jQuery to run with jqLite as well. Ref angular#8486 Ref angular#8695
A followup (related to my last comment): #15846. |
The previous implementation of jqLite didn't use cleanData from the jqLite object but instead used a cached version which maede it impossible to monkey-patch jqLite.cleanData similarly to how you can do it in jQuery. The cleanData method is not meant to be called directly by userland code; its purpose is mainly to be able to be monkey-patched; therefore, the previous implementation didn't make a lot of sense. This commit enables one of the tests so far run only with jQuery to run with jqLite as well. Ref #8486 Ref #8695 Closes #15846
The previous implementation of jqLite didn't use cleanData from the jqLite object but instead used a cached version which maede it impossible to monkey-patch jqLite.cleanData similarly to how you can do it in jQuery. The cleanData method is not meant to be called directly by userland code; its purpose is mainly to be able to be monkey-patched; therefore, the previous implementation didn't make a lot of sense. This commit enables one of the tests so far run only with jQuery to run with jqLite as well. (cherry-picked from bf5c2ee) Ref #8486 Ref #8695 Closes #15846
So far it wasn't tested that Angular's logic for skipping it triggering
the $destroy event on jQuery.cleanData in the replaceWith internal function
works correctly when Angular is not the last one to patch the cleanData method
(e.g. if jQuery UI does the patching later). This commits adds the relevant
test.
Ref #8486
cc @IgorMinar