Test stabilization: Race condition between clicking and receiving a new article causes click to fail.
This commit is contained in:
parent
6998eb9be2
commit
53db2cfc8e
1 changed files with 19 additions and 11 deletions
|
@ -361,6 +361,9 @@ class AgentProfilePermissionsTest < TestCase
|
|||
exists(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
||||
exists_not(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
||||
|
||||
begin
|
||||
retries ||= 0
|
||||
|
||||
# scroll to the Avatar at the top of the zoom view and click it
|
||||
# scrolling is needed because the browser might have scrolled down
|
||||
# caused by a undeliverable email (of the created ticket)
|
||||
|
@ -373,5 +376,10 @@ class AgentProfilePermissionsTest < TestCase
|
|||
|
||||
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||
exists_not(css: '.content.active .js-action [data-type="edit"]')
|
||||
rescue Selenium::WebDriver::Error::UnknownError
|
||||
sleep retries
|
||||
retries += 1
|
||||
retry if retries < 3
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue