Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.6:testing
obs-server
obs-server-2.6.6-0008-test-Do-not-click-on-invi...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.6.6-0008-test-Do-not-click-on-invisible-reload-button-wait-fo.patch of Package obs-server
From 68a3bb96d2afd71aad971261e281131ae1746ba1 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Thu, 22 Oct 2015 21:10:46 +0100 Subject: [PATCH 8/9] [test] Do not click on invisible reload button, wait for it to appear. This change fixes test error that happens intermittently. Sometimes reload button doesn't become visible immediately, it appears little bit later. If Capybara.ignore_hidden_elements is true (this is default), then first('.icons-reload') returns nil until the button becomes visible. Hence, it's better to wait until it appears and then click it than to try to use #click method on nil. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- src/api/test/functional/webui/package_controller_test.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/test/functional/webui/package_controller_test.rb b/src/api/test/functional/webui/package_controller_test.rb index f52c8ef..8129c98 100644 --- a/src/api/test/functional/webui/package_controller_test.rb +++ b/src/api/test/functional/webui/package_controller_test.rb @@ -191,7 +191,12 @@ class Webui::PackageControllerTest < Webui::IntegrationTest # test reload and wait for the build to finish starttime=Time.now while Time.now - starttime < 10 - first('.icons-reload').click + reload_button = first('.icons-reload') + if !reload_button + sleep 0.1 + next + end + reload_button.click if page.has_selector? '.buildstatus' break if find('.buildstatus').text == 'succeeded' end -- 2.1.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor