Improved stability of tests.

This commit is contained in:
Martin Edenhofer 2016-06-21 20:42:55 +02:00
parent 7a13889258
commit 4cfede572e
2 changed files with 16 additions and 8 deletions

View file

@ -118,7 +118,7 @@ class AgentTicketActionLevel8Test < TestCase
sendkey(
value: :enter,
)
sleep 3
sleep 10
# set tag #2
click(
@ -131,7 +131,7 @@ class AgentTicketActionLevel8Test < TestCase
sendkey(
value: :enter,
)
sleep 3
sleep 10
# set tag #3 + #4
click(
@ -144,7 +144,7 @@ class AgentTicketActionLevel8Test < TestCase
sendkey(
value: :enter,
)
sleep 3
sleep 10
# set tag #5
click(
@ -157,7 +157,7 @@ class AgentTicketActionLevel8Test < TestCase
click(
css: '#global-search',
)
sleep 3
sleep 10
# verify tags
tags_verify(

View file

@ -1467,7 +1467,6 @@ wait untill text in selector disabppears
element.click
element.clear
# workaround, sometimes focus is not triggered
element.send_keys(params[:customer])
sleep 2.5
@ -1830,13 +1829,23 @@ wait untill text in selector disabppears
element.click
element.clear
# workaround, sometimes focus is not triggered
# ff issue, sometimes focus event gets dropped
# if drowdown is not open, try it again
if !instance.find_elements(css: '.active .newTicket .js-recipientDropdown.open')[0]
instance.execute_script('$(".active .newTicket .js-recipientDropdown").addClass("open")')
end
element.send_keys(data[:customer])
sleep 2.5
element.send_keys(:enter)
#instance.find_elements(css: '.active .newTicket .recipientList-entry.js-user.is-active')[0].click
sleep 0.4
# ff issue, sometimes enter event gets dropped
# take user manually
if instance.find_elements(css: '.active .newTicket .js-recipientDropdown.open')[0]
instance.find_elements(css: '.active .newTicket .recipientList-entry.js-user.is-active')[0].click
sleep 0.4
end
end
if params[:custom_data_select]
@ -1993,7 +2002,6 @@ wait untill text in selector disabppears
element.click
element.clear
# workaround, sometimes focus is not triggered
element.send_keys(data[:customer])
sleep 2.5