[dojo-contributors] Dijit Intern-Conversion
Jason.Voccia at mathworks.com
Mon Dec 22 11:04:08 EST 2014
I will update the branch with your suggestions regarding getting rid of
the old method of accessing widgets, and move them to require.
Some helper utilities would probably make testing easier, but most of the
work in the conversion seems to be more getting things working correctly.
Even given code that presumably works in DOHRobot, the same code when
converting to Intern seems to be difficult to get correct.
I noticed a couple of things when using the framework locally:
1) After a while, I would suddenly start getting consistent test failures
in tests that were passing, that were working earlier in the day. I
started closing everything down and restarting it on a regular basis to
avoid this ‹ I wish I had some repo steps here. Instead it seemed to
just randomly happen - felt like I was being gaslamped at times.
2) The tests for menu_mouse were all written with the state of the last
test influencing the next test. This seems to be discouraged in Intern,
and certainly made test conversions much harder.
3) I realized when writing tests, I sometimes made a mistake with the
callbacks, and therefore, I would have situations where asserts that I
thought were running were not running. These were my mistakes, and when I
caught them I was able to easily fix them, but it would be nice to have
some method to ³assert² that X number of asserts were run.
I agree that a lot of these tests may be better served by ³unit tests² but
I think almost every one uses DOHRobot right now. To me, that means these
tests are functional in nature. It would probably be easier to convert if
a lot of them turned into unit tests, but you would be getting in some
cases a different coverage profile, and it is likely going to be more
logistically challenging to track then it already isŠ
On 12/1/14, 8:42 PM, "Dylan Schiemann" <dylan at dojotoolkit.org> wrote:
>Thanks, we're definitely open to these types of contributions.
>Our goal is to land the changes for Dojo core before the end of the
>year. For Dijit, there are so many tests, that I don't know if we've
>decided on the right branching strategy for migrating tests.
>One thing I started working on, but haven't had time to revisit in a
>while, is a helper utility to make it a bit more efficient to get
>references to Dijits at https://github.com/theintern/leadfoot/pull/13 .
>It's intended to make
>easier to achieve, to something like
>. There are some good suggestions in that ticket that I've not had a
>chance to work on yet, so I would be very open to getting some help to
>land some helper utilities to make it easier in general to work with
>Dijits. My goal was to make it as easy as the APIs for referencing a DOM
>I would also try to find a way to change
>to not rely on legacy dijit.* features.
>I'm sure others will have additional feedback. For example, I feel like
>some of these tests really rely on knowing the structure of the code
>base (when really a pure functional test should be from an end user
>perspective), so I'm wondering if some of them could be converted to
>unit tests to reduce the complexity and number of tests, etc., but maybe
>on 12/1/14, 12:26 (GMT-07:00) Jason Voccia said the following:
>> I am new to contributing code to Dijit/Dojo, and found that DOHRobot was
>> not working well in any configuration I could put together.
>> It also looks like you all are moving to intern for testing from DOH.
>> I wanted to get an automated test for #18262 before submitting so I took
>> a first pass at converting the menu_mouse tests in Dijit to intern ‹
>> following the layout you all used for Dojo (folder called tests-intern
>> off the root of the repo)
>> Are you open to these types of contributions?
>> Is there a place where you are collecting these types of changes?
>> And finally if the first two questions are affirmative ‹ Could I get
>> some feedback/help on getting these tests to passing at 100%/techniques
>> to simplify the testing code/or what I am doing wrong :)?
>Dojo workshops in the US, Canada, and Europe:
>SitePen Insider: http://sitepen.com/insider/
>dojo-contributors mailing list
More information about the dojo-contributors