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

Jon Robson jrobson at wikimedia.org
Tue Mar 4 02:34:31 UTC 2014


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?



More information about the QA mailing list