Removed general scroll_to at any click, do it now dedicated where it is needed for chrome.
This commit is contained in:
parent
f314bdfe1c
commit
38eb9e194e
4 changed files with 29 additions and 13 deletions
|
@ -265,7 +265,6 @@ class AgentTicketActionLevel5Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# execute reply
|
# execute reply
|
||||||
click_catcher_remove
|
|
||||||
sleep 5 # time to recognice form changes
|
sleep 5 # time to recognice form changes
|
||||||
click(
|
click(
|
||||||
css: '.active [data-type="reply"]',
|
css: '.active [data-type="reply"]',
|
||||||
|
|
|
@ -32,8 +32,13 @@ class AgentTicketActionLevel7Test < TestCase
|
||||||
do_not_submit: true,
|
do_not_submit: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# scroll to reply - needed for chrome
|
||||||
|
scroll_to(
|
||||||
|
position: 'botton',
|
||||||
|
css: '.content.active [data-type="reply"]',
|
||||||
|
)
|
||||||
|
|
||||||
# click reply
|
# click reply
|
||||||
click_catcher_remove
|
|
||||||
click( css: '.content.active [data-type="reply"]' )
|
click( css: '.content.active [data-type="reply"]' )
|
||||||
|
|
||||||
# check body
|
# check body
|
||||||
|
@ -50,8 +55,13 @@ class AgentTicketActionLevel7Test < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# scroll to reply - needed for chrome
|
||||||
|
scroll_to(
|
||||||
|
position: 'botton',
|
||||||
|
css: '.content.active [data-type="reply"]',
|
||||||
|
)
|
||||||
|
|
||||||
# click reply
|
# click reply
|
||||||
click_catcher_remove
|
|
||||||
click( css: '.content.active [data-type="reply"]' )
|
click( css: '.content.active [data-type="reply"]' )
|
||||||
|
|
||||||
# check body
|
# check body
|
||||||
|
|
|
@ -45,6 +45,12 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
css: '.active table tr td input[value="' + ticket1[:id] + '"] + .icon-checkbox.icon-unchecked',
|
css: '.active table tr td input[value="' + ticket1[:id] + '"] + .icon-checkbox.icon-unchecked',
|
||||||
fast: true,
|
fast: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# scroll to reply - needed for chrome
|
||||||
|
scroll_to(
|
||||||
|
position: 'top',
|
||||||
|
css: '.active table tr td input[value="' + ticket2[:id] + '"] + .icon-checkbox.icon-unchecked',
|
||||||
|
)
|
||||||
click(
|
click(
|
||||||
css: '.active table tr td input[value="' + ticket2[:id] + '"] + .icon-checkbox.icon-unchecked',
|
css: '.active table tr td input[value="' + ticket2[:id] + '"] + .icon-checkbox.icon-unchecked',
|
||||||
fast: true,
|
fast: true,
|
||||||
|
|
|
@ -254,14 +254,9 @@ class TestCase < Test::Unit::TestCase
|
||||||
instance = params[:browser] || @browser
|
instance = params[:browser] || @browser
|
||||||
if params[:css]
|
if params[:css]
|
||||||
|
|
||||||
scroll_to(
|
|
||||||
browser: instance,
|
|
||||||
css: params[:css],
|
|
||||||
mute_log: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
element = instance.find_elements( { css: params[:css] } )[0]
|
element = instance.find_elements( { css: params[:css] } )[0]
|
||||||
instance.mouse.move_to(element)
|
instance.mouse.move_to(element)
|
||||||
|
sleep 0.2
|
||||||
element.click
|
element.click
|
||||||
|
|
||||||
# trigger also focus on input/select and textarea fields
|
# trigger also focus on input/select and textarea fields
|
||||||
|
@ -279,6 +274,7 @@ class TestCase < Test::Unit::TestCase
|
||||||
|
|
||||||
scroll_to(
|
scroll_to(
|
||||||
browser: browser1,
|
browser: browser1,
|
||||||
|
position: 'top', # botton
|
||||||
css: '.some_class',
|
css: '.some_class',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -289,12 +285,17 @@ class TestCase < Test::Unit::TestCase
|
||||||
|
|
||||||
instance = params[:browser] || @browser
|
instance = params[:browser] || @browser
|
||||||
|
|
||||||
|
position = 'true'
|
||||||
|
if params[:position] == 'botton'
|
||||||
|
position = 'false'
|
||||||
|
end
|
||||||
|
|
||||||
execute(
|
execute(
|
||||||
browser: instance,
|
browser: instance,
|
||||||
js: "\$('#{params[:css]}').get(0).scrollIntoView(false)",
|
js: "\$('#{params[:css]}').get(0).scrollIntoView(#{position})",
|
||||||
mute_log: params[:mute_log]
|
mute_log: params[:mute_log]
|
||||||
)
|
)
|
||||||
sleep 0.4
|
sleep 0.2
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
Loading…
Reference in a new issue