# Horrible hack to ensure the search results can't load correctly
# on the second attempt.
assert_selector '#recent-pipeline-instances'
assert page.evaluate_script('$("#recent-pipeline-instances[data-infinite-content-href0]").attr("data-infinite-content-href0","/give-me-an-error").length == 1')
# Wait for the first page of results to appear.
# Horrible hack to ensure the search results can't load correctly
# on the second attempt.
assert_selector '#recent-pipeline-instances'
assert page.evaluate_script('$("#recent-pipeline-instances[data-infinite-content-href0]").attr("data-infinite-content-href0","/give-me-an-error").length == 1')
# Wait for the first page of results to appear.