Improved speed of tests.
This commit is contained in:
parent
f52c1b9862
commit
7f3dcc5fa8
2 changed files with 97 additions and 16 deletions
|
@ -77,7 +77,80 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
)
|
||||
|
||||
# use overview navigation to got to #2 & #3
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .ticketZoom .overview-navigator .pagination-counter',
|
||||
:value => '1/3',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .page-header .ticket-number',
|
||||
:value => ticket1[:number],
|
||||
)
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.ticketZoom .overview-navigator .next',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .ticketZoom .overview-navigator .pagination-counter',
|
||||
:value => '2/3',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .page-header .ticket-number',
|
||||
:value => ticket2[:number],
|
||||
)
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.ticketZoom .overview-navigator .next',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .ticketZoom .overview-navigator .pagination-counter',
|
||||
:value => '3/3',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .page-header .ticket-number',
|
||||
:value => ticket3[:number],
|
||||
)
|
||||
|
||||
# close ticket
|
||||
ticket_update(
|
||||
:browser => browser2,
|
||||
:data => {
|
||||
:state => 'closed',
|
||||
}
|
||||
)
|
||||
sleep 8
|
||||
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .ticketZoom .overview-navigator .pagination-counter',
|
||||
:value => '3/3',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .page-header .ticket-number',
|
||||
:value => ticket3[:number],
|
||||
)
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.ticketZoom .overview-navigator .previous',
|
||||
)
|
||||
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .ticketZoom .overview-navigator .pagination-counter',
|
||||
:value => '2/2',
|
||||
)
|
||||
match(
|
||||
:browser => browser2,
|
||||
:css => '.active .page-header .ticket-number',
|
||||
:value => ticket2[:number],
|
||||
)
|
||||
end
|
||||
end
|
|
@ -495,6 +495,7 @@ class TestCase < Test::Unit::TestCase
|
|||
|
||||
for i in 1..100
|
||||
sleep 1
|
||||
begin
|
||||
if instance.find_elements( { :css => '.navigation .tasks .task:first-child' } )[0]
|
||||
instance.mouse.move_to( instance.find_elements( { :css => '.navigation .tasks .task:first-child' } )[0] )
|
||||
sleep 0.2
|
||||
|
@ -513,6 +514,9 @@ class TestCase < Test::Unit::TestCase
|
|||
else
|
||||
break
|
||||
end
|
||||
rescue
|
||||
# just try again
|
||||
end
|
||||
end
|
||||
assert( true, "all tasks closed" )
|
||||
end
|
||||
|
@ -712,10 +716,14 @@ class TestCase < Test::Unit::TestCase
|
|||
found = nil
|
||||
(1..5).each {|loop|
|
||||
if !found
|
||||
begin
|
||||
text = instance.find_elements( { :css => '.content.active .js-reset' } )[0].text
|
||||
if text =~ /(Discard your unsaved changes.|Verwerfen der)/
|
||||
found = true
|
||||
end
|
||||
rescue
|
||||
# just try again
|
||||
end
|
||||
sleep 1
|
||||
end
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue