[QA] Browser testing components that disappear quickly e.g. ajax

Chris McMahon cmcmahon at wikimedia.org
Tue Mar 4 14:33:16 UTC 2014


See if this would do what you want:
https://gerrit.wikimedia.org/r/#/c/115659/

It works pretty well, there are a couple of other similar checks in the
repos.


On Mon, Mar 3, 2014 at 7:34 PM, Jon Robson <jrobson at wikimedia.org> wrote:

> Anyone?
>
> On Fri, Feb 28, 2014 at 2:15 PM, Jon Robson <jrobson at wikimedia.org> wrote:
> > I have two things I want to write tests for.
> > 1) When a user clicks on a link in alpha on mobile the page loads via
> > JavaScript and an ajax loader appears.
> >
> > 2) When a user uploads an image, after hitting submit they see a
> progress bar.
> >
> > Both of these elements typically appear for a short period of time
> > before disappearing.
> >
> > Using the following rule:
> >
> > Then(/^I see an upload progress bar$/) do
> >   on(ArticlePage).progress_header_element.when_present.should be_visible
> > end
> >
> > When I watch the test run I see that the progress_header is in fact
> > visible, but Watir does not find it. If I update the JavaScript so the
> > progress header never disappears, then the test passes.
> >
> > Is there some kind of time interval for checking this sort of thing?
> >
> > For reference here is the patch...
> > https://gerrit.wikimedia.org/r/#/c/116167/
> >
> > Any ideas how to deal with this sort of browser test?
>
> _______________________________________________
> QA mailing list
> QA at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/qa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140304/0448aace/attachment.html>


More information about the QA mailing list