Commit 15c1278d authored by kytv's avatar kytv
Browse files

Check that notification-daemon is running when looking for notifications fails

Will-fix: #9332
parent c4b6e311
......@@ -37,6 +37,17 @@ def deactivate_filesystem_shares
#end
end
def notification_helper(notification_image, time_to_wait)
# notifiction-daemon may abort during start-up, causing the tests that look for
# desktop notifications to fail (ticket #8686)
begin
@screen.wait(notification_image, time_to_wait)
rescue FindFailed => e
step 'process "notification-daemon" is running'
raise e
end
end
def restore_background
@vm.restore_snapshot($background_snapshot)
@vm.wait_until_remote_shell_is_up
......@@ -317,7 +328,7 @@ end
When /^I see the 'Tor is ready' notification$/ do
next if @skip_steps_while_restoring_background
@screen.wait("GnomeTorIsReady.png", 300)
notification_helper('GnomeTorIsReady.png', 300)
@screen.waitVanish("GnomeTorIsReady.png", 15)
end
......
......@@ -51,7 +51,7 @@ end
Then /^I see the Unsafe Browser start notification and wait for it to close$/ do
next if @skip_steps_while_restoring_background
@screen.wait("UnsafeBrowserStartNotification.png", 30)
notification_helper('UnsafeBrowserStartNotification.png', 30)
@screen.waitVanish("UnsafeBrowserStartNotification.png", 10)
end
......@@ -157,7 +157,7 @@ end
Then /^I see the Unsafe Browser stop notification$/ do
next if @skip_steps_while_restoring_background
@screen.wait('UnsafeBrowserStopNotification.png', 20)
notification_helper('UnsafeBrowserStopNotification.png', 20)
@screen.waitVanish('UnsafeBrowserStopNotification.png', 10)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment