Code review comment for lp:~bjornt/launchpad/windmill-more-problems

Revision history for this message
Björn Tillenius (bjornt) wrote :

Some more fixes to Windmill tests. The whole suite is now passing
locally on my box.

The bulk of the changes is to wait for elements before doing anything
with them. I've also change a few places where we first wait for the
element, and then assert the exact thing. This isn't necessary, since
the wait is basically an assert with a timeout.

There is some bug in Windmill, though, that if you first wait, and then
assert the element directly after, it sometimes fails. That's why I've
change a lot of code to wait only, instead of trying to assert it. I
suspect that this is a race condition, in that waiting for an element
listens to some dom-modified event, which gets fired out slightly before
the dom has actually been updated, so the dom might not be ready yet
when the assertion happens. I'll look further into this to see what I
can find out, but we should be able to trust that waiting for an element
works.

And after all, it's a lot better to have an occasional 'spurious
success' than a spurious failure.

I also change one test to log in after loading a page, rather than
before. I've seen some strange error where the login succeeds, but then
when you open another page the user is logged out again.

--
Björn Tillenius | https://launchpad.net/~bjornt

« Back to merge proposal