Commit 99cb79e3 authored by kytv's avatar kytv
Browse files

Optimize IRC test using waitAny

If connecting to IRC fails, such as when OFTC is blocking Tor, waiting
60 seconds to connect while a a Reconnect button is visible is
sub-optimal. It would be better to try forcing a new Tor circuit and
clicking the reconnect button.

Will-fix: #9653
parent a3326963
......@@ -296,8 +296,9 @@ end
Then /^Pidgin successfully connects to the "([^"]+)" account$/ do |account|
next if @skip_steps_while_restoring_background
expected_channel_entry = chan_image(account, default_chan(account), 'roster')
reconnect_button = 'PidginReconnect.png'
recovery_on_failure = do
@screen.wait_and_click('PidginReconnect.png', 20)
@screen.wait_and_click(reconnect_button, 20)
retry_tor(recovery_on_failure) do
......@@ -308,8 +309,10 @@ Then /^Pidgin successfully connects to the "([^"]+)" account$/ do |account|
# conversation window. At worst, the test will still fail...
# FIXME This should be modified to use waitAny once #9633 is addressed
@screen.wait(expected_channel_entry, 60)
on_screen, _ = @screen.waitAny([expected_channel_entry, reconnect_button], 60)
unless on_screen == expected_channel_entry
raise "Connecting to account #{account} failed."
Supports Markdown
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