Added workaround for ff keyboard binding issue.

This commit is contained in:
Martin Edenhofer 2016-06-17 12:57:54 +02:00
parent cc7b49ebbe
commit b348d70f23
2 changed files with 29 additions and 5 deletions

View file

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

View file

@ -10,13 +10,37 @@ class KeyboardShortcutsTest < TestCase
url: browser_url, url: browser_url,
) )
tasks_close_all() tasks_close_all()
sleep 2
# show shortkeys # show shortkeys
shortcut(key: 'h') shortcut(key: 'h')
# ff issue, sometimes shortcut is not fired in browser test env
if ENV['BROWSER'] && ENV['BROWSER'] =~ /firefox/i
exists = false
(1..4).each {|_count|
sleep 1
next if !@browser.find_elements(css: '.modal')[0]
exists = true
}
if !exists
reload
sleep 4
shortcut(key: 'h')
(1..4).each {|_count|
sleep 1
next if !@browser.find_elements(css: '.modal')[0]
exists = true
}
end
if !exists
shortcut(key: 'h')
end
end
watch_for( watch_for(
css: '.modal', css: '.modal',
value: 'Keyboard Shortcuts', value: 'Keyboard Shortcuts',
timeout: 2, timeout: 6,
) )
# hide shortkeys # hide shortkeys