diff --git a/testsuite/features/step_definitions/common_steps.rb b/testsuite/features/step_definitions/common_steps.rb index deeca226188..9903c320ef3 100644 --- a/testsuite/features/step_definitions/common_steps.rb +++ b/testsuite/features/step_definitions/common_steps.rb @@ -180,7 +180,7 @@ And I follow first "#{event}" And I wait until I see "This action will be executed after" text And I wait until I see "#{event}" text - And I wait at most #{complete_timeout} seconds until the event is completed, refreshing the page + And I wait at most #{complete_timeout} seconds until the "#{event}" is completed, refreshing the page ) end diff --git a/testsuite/features/step_definitions/navigation_steps.rb b/testsuite/features/step_definitions/navigation_steps.rb index 26ebdaaebf8..3f5d6eed238 100644 --- a/testsuite/features/step_definitions/navigation_steps.rb +++ b/testsuite/features/step_definitions/navigation_steps.rb @@ -81,12 +81,17 @@ end end -When(/^I wait at most (\d+) seconds until the event is completed, refreshing the page$/) do |timeout| +When(/^I wait at most (\d+) seconds until the "([^"]*)" is completed, refreshing the page$/) do |timeout, event| last = Time.now next if has_content?('This action\'s status is: Completed.', wait: 3) repeat_until_timeout(timeout: timeout.to_i, message: 'Event not yet completed') do break if has_content?('This action\'s status is: Completed.', wait: 3) + + if has_content?('Minion is down or could not be contacted.', wait: 3) + find(:xpath, "//input[@value='Reschedule']").click + step %(I wait 30 seconds until the event is picked up and #{timeout} seconds until the event "#{event}" is completed) + end raise SystemCallError, 'Event failed' if has_content?('This action\'s status is: Failed.', wait: 3) current = Time.now