-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix failing tests without jQuery #4
Conversation
@@ -97,7 +97,7 @@ module.exports = class Layout extends View | |||
openLink: (event) => | |||
return if utils.modifierKeyPressed(event) | |||
|
|||
el = if Backbone.$ then event.currentTarget else event.delegateTarget | |||
el = event.currentTarget |
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.
Had to use currentTarget because delegateTarget didn't seems to have the same semantics in NativeView than its jQuery counterpart. Mind an issue in the NativeView repo?
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.
Not at all, thanks. I've been wondering about making the jump to use delegateTarget
.
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.
Might need to revert this commit. It's the cause of 8 failling tests with NativeView.
Merging as-is, will figure out the testing details later. The Chaplin tests are pretty convoluted at the moment and not entirely easy to reason about. I'm pretty familiar with RequireJS, though, and happy to help. I have another branch (207487d) that has some work on this too. |
Nevermind the RequireJS bits, i've figured out a workaround. Some cleanup to do and i'll push for review. |
Cool |
Done. Had to always use Underscore, all blew up without due to several calls to _.clone. |
Done. Needed to dome some weird stuff to define/undefine and then define again Underscore, else a circular dependancie caused Backbone to be empty. |
@akre54 I've finally had some time to fix all the failing tests. There's still a lot of jQuery branching through the specs and the codebase, but i'm not sure it's safe to remove $loadind, $list and all. Also, the commits are messy, but i assume this branch will be rebased. |
@akre54 Friendly ping. Do you prefer that I open a new rebased PR against main Chapin repo? |
Fix failing tests without jQuery
Whatever works for you. I've also added you as a collaborator on my fork, so feel free to push any changes you want. |
Cool. Hopefully I'll could work on this next week, I'll see what fit the best at this time. Thanks a lot for your help on this. |
Finally had some time to work on #3. This PR is a WIP, tests still fails with the exo setup.
There's a few bug in the current version of test/initialize.js when tests are launched with the type=exos&useDeps=false query string.
I've fixed locally some of them, but i currently encouter a problem with the NativeView shim.
When NativeView replace BackboneView in the test setup, Chaplin.View has aleardy been required, so it extends Backbone.View instead of NativeView.
I'm a total noob with requireJS config, so any input is welcome