Fully namespaced, debuggable unit tests

Anastasia Cheetham a.cheetham at utoronto.ca
Thu Feb 28 19:55:20 UTC 2008


On 28-Feb-08, at 10:29 AM, Anastasia Cheetham wrote:

> Some observations (so far):


Further observations:

Using jsUnit, the test HTML markup is not actually rendered on-screen,  
but is essentially 'virtually' rendered in an off-screen model. This  
actually worked in our favor, because the Lightbox grid flows the  
images according to the window width, and the off-screen model  
indirectly resulted in a consistent window size, allowing the tests to  
make assumptions about where the thumbnails are in relation to each  
other.

With the new testing framework, the test HTML markup is actually  
rendered, which means that the spatial arrangement of the thumbnails  
is dependent on the window size, and our assumptions no longer hold.  
We have ways of forcing the grid into a certain size, and I'm working  
with that now, so we should be able to address this.


Also: The tests are not terribly successful in IE on Windows.

I haven't fully identified what's going on, but the first test runs,  
but seems to simply fail outright in its attempt to move an image by  
simulating a control+arrow. Subsequent tests encounter an undefined  
error attempting to focus the Lightbox. This seems to be related to  
setup and teardown issues, because this happens regardless of the  
order the tests are run (first test runs, next test has error).

Still investigating...

-- 
Anastasia Cheetham                   a.cheetham at utoronto.ca
Software Designer, Fluid Project           fluidproject.org
Adaptive Technology Resource Centre / University of Toronto




More information about the fluid-work mailing list