These are chat archives for ractivejs/ractive

3rd
Apr 2018
Bruce Tu
@brtu
Apr 03 2018 16:09
@evs-chris so i tried disabling delegation for the tests and it did not seem to work. it seems like the when i programmatically simulate actions like clicking/selecting stuff, the test does not see the changes. i tried for a long time to reproduce the issue that i am seeing in a sandbox, but had trouble with it because my environment has a lot of pieces. here is what i have so far: http://jsfiddle.net/yhZBv/540/
the tests are run with Jest CLI v0.9.0, jasmine2 and are in coffeescript, i tried stripping things down and minimizing it as best as i could. the unit tests works in ractive .8 but not in .9. however, i could not get the sandbox to work like my environment
Chris Reeves
@evs-chris
Apr 03 2018 16:13
So Ractive.defaults.delegate = false in the test init doesn't help?
Bruce Tu
@brtu
Apr 03 2018 16:17
i don't believe so. i am also not quite sure if i did Ractive.defaults.delegate = false; in the right place
Paul Maly
@PaulMaly_twitter
Apr 03 2018 17:03
You need to do that before any Ractive's instance created,
Bruce Tu
@brtu
Apr 03 2018 17:08
i have it added under the ractive import as well as before creating the new ractive instance
in my test, when clicking on the element, the event set in the on-click does not seem to fire
Paul Maly
@PaulMaly_twitter
Apr 03 2018 17:17
your example is not working
Bruce Tu
@brtu
Apr 03 2018 17:24
yeah... when trying to emulate my environment i could not get the sandbox to work
http://jsfiddle.net/yhZBv/521/ this was an earlier sandbox i had but it works fine
i kept adding parts to get closer to my environment to see when the error happened, but could not get it to work the same way
Paul Maly
@PaulMaly_twitter
Apr 03 2018 17:31
you have an error in console
Paul Maly
@PaulMaly_twitter
Apr 03 2018 17:39
seems you don't understand js variables resolving process very well )
Bruce Tu
@brtu
Apr 03 2018 17:40
probably
without errors
Bruce Tu
@brtu
Apr 03 2018 17:42
oh that is great
Bruce Tu
@brtu
Apr 03 2018 21:31
so i am still unable to get these unit tests working on my own project. it seems like the click event happens, but the on-click event does not get triggered. when i add the keyword "onclick" to my node though, the on-click event gets triggered. it is very strange