Fixed browser tests.
This commit is contained in:
parent
d4dfab1c9a
commit
31613b09d2
3 changed files with 38 additions and 2 deletions
|
@ -32,6 +32,12 @@ class AgentTicketOverviewLevel0Test < TestCase
|
|||
)
|
||||
sleep 6 # till overview is updated
|
||||
click( text: 'Overviews' )
|
||||
|
||||
# enable full overviews
|
||||
execute(
|
||||
js: '$(".content.active .sidebar").css("display", "block")',
|
||||
)
|
||||
|
||||
click( text: 'Unassigned & Open Tickets' )
|
||||
sleep 4 # till overview is rendered
|
||||
|
||||
|
|
|
@ -193,10 +193,9 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
)
|
||||
sleep 8
|
||||
|
||||
match(
|
||||
exists_not(
|
||||
browser: browser2,
|
||||
css: '.active .ticketZoom .ticketZoom-controls .overview-navigator .pagination-counter .pagination-item-current',
|
||||
value: '2',
|
||||
)
|
||||
match(
|
||||
browser: browser2,
|
||||
|
|
|
@ -266,6 +266,26 @@ class TestCase < Test::Unit::TestCase
|
|||
sleep 0.4 if !params[:fast]
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
execute(
|
||||
:browser => browser1,
|
||||
:js => '.some_class',
|
||||
)
|
||||
|
||||
=end
|
||||
|
||||
def execute(params)
|
||||
log('js', params)
|
||||
|
||||
instance = params[:browser] || @browser
|
||||
if params[:js]
|
||||
instance.execute_script(params[:js])
|
||||
return
|
||||
end
|
||||
fail "Invalid execute params #{params.inspect}"
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
exists(
|
||||
|
@ -1372,6 +1392,10 @@ wait untill text in selector disabppears
|
|||
|
||||
instance.find_elements( { css: '.js-overviewsMenuItem' } )[0].click
|
||||
sleep 1
|
||||
execute(
|
||||
browser: instance,
|
||||
js: '$(".content.active .sidebar").css("display", "block")',
|
||||
)
|
||||
instance.find_elements( { css: ".content.active .sidebar a[href=\"#{params[:link]}\"]" } )[0].click
|
||||
sleep 1
|
||||
instance.find_elements( { partial_link_text: params[:number] } )[0].click
|
||||
|
@ -1454,6 +1478,12 @@ wait untill text in selector disabppears
|
|||
|
||||
instance.find_elements( { css: '.js-overviewsMenuItem' } )[0].click
|
||||
sleep 2
|
||||
|
||||
execute(
|
||||
browser: instance,
|
||||
js: '$(".content.active .sidebar").css("display", "block")',
|
||||
)
|
||||
|
||||
overviews = {}
|
||||
instance.find_elements( { css: '.content.active .sidebar a[href]' } ).each {|element|
|
||||
url = element.attribute('href')
|
||||
|
@ -1466,6 +1496,7 @@ wait untill text in selector disabppears
|
|||
count = instance.find_elements( { css: ".content.active .sidebar a[href=\"#{url}\"] .badge" } )[0].text
|
||||
overviews[url] = count.to_i
|
||||
}
|
||||
log('overview_counter', overviews)
|
||||
overviews
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue