Some timing improvements.
This commit is contained in:
parent
1a3affa659
commit
20523a7bd8
5 changed files with 11 additions and 24 deletions
|
@ -13,7 +13,6 @@ class AgentOrganizationProfileTest < TestCase
|
|||
:url => browser_url,
|
||||
)
|
||||
tasks_close_all()
|
||||
sleep 1
|
||||
|
||||
# search and open org
|
||||
organization_open_by_search(
|
||||
|
@ -34,7 +33,6 @@ class AgentOrganizationProfileTest < TestCase
|
|||
:value => 'some note 123'
|
||||
)
|
||||
click( :css => '.active .profile' )
|
||||
sleep 1
|
||||
|
||||
# check and change note again in edit screen
|
||||
click( :css => '.active .js-action .select-arrow' )
|
||||
|
@ -69,7 +67,6 @@ class AgentOrganizationProfileTest < TestCase
|
|||
:body => 'org profile check ' + message,
|
||||
},
|
||||
)
|
||||
sleep 1
|
||||
|
||||
# switch to org tab, verify if ticket is shown
|
||||
organization_open_by_search(
|
||||
|
|
|
@ -46,7 +46,6 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
sendkey(
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
click( :css => '.active .shortcut > ul> li > a' )
|
||||
|
||||
watch_for(
|
||||
|
@ -136,7 +135,6 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.active .shortcut > ul> li > a',
|
||||
|
@ -160,25 +158,21 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.active .newTicket .recipientList-entry.js-user.is-active',
|
||||
)
|
||||
sleep 1
|
||||
|
||||
set(
|
||||
:browser => browser2,
|
||||
:css => '.active div[data-name=body]',
|
||||
:value => '::' + random,
|
||||
)
|
||||
sleep 1
|
||||
sendkey(
|
||||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.active .shortcut > ul> li > a',
|
||||
|
@ -210,19 +204,18 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
:css => '.active div[data-name=body]',
|
||||
:value => 'test',
|
||||
)
|
||||
sleep 1
|
||||
|
||||
set(
|
||||
:browser => browser2,
|
||||
:css => '.active div[data-name=body]',
|
||||
:value => '::' + random,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
sendkey(
|
||||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.active .shortcut > ul> li > a',
|
||||
|
@ -259,13 +252,10 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.modal .recipientList-entry.js-user.is-active',
|
||||
)
|
||||
sleep 1
|
||||
click(
|
||||
:browser => browser2,
|
||||
:css => '.modal-content .js-submit',
|
||||
|
@ -275,20 +265,17 @@ class AgentTicketActionLevel0Test < TestCase
|
|||
:browser => browser2,
|
||||
:css => '.modal',
|
||||
)
|
||||
sleep 1
|
||||
|
||||
watch_for(
|
||||
:browser => browser2,
|
||||
:css => '.active div[data-name=body]',
|
||||
:value => '::' + random,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
sendkey(
|
||||
:browser => browser2,
|
||||
:value => :arrow_down,
|
||||
)
|
||||
sleep 1
|
||||
|
||||
click(
|
||||
:browser => browser2,
|
||||
|
|
|
@ -34,7 +34,6 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
'order::direction' => 'down',
|
||||
}
|
||||
)
|
||||
sleep 1
|
||||
|
||||
# create tickets
|
||||
ticket1 = ticket_create(
|
||||
|
@ -46,7 +45,6 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
:body => 'overview #1',
|
||||
}
|
||||
)
|
||||
sleep 1
|
||||
|
||||
# keep connection alive
|
||||
click(
|
||||
|
@ -63,7 +61,6 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
:body => 'overview #2',
|
||||
}
|
||||
)
|
||||
sleep 1
|
||||
|
||||
ticket3 = ticket_create(
|
||||
:browser => browser1,
|
||||
|
|
|
@ -67,7 +67,6 @@ class AgentUserProfileTest < TestCase
|
|||
:body => 'user profile check ' + message,
|
||||
},
|
||||
)
|
||||
sleep 1
|
||||
|
||||
# switch to org tab, verify if ticket is shown
|
||||
user_open_by_search( :value => 'Braun' )
|
||||
|
|
|
@ -195,6 +195,7 @@ class TestCase < Test::Unit::TestCase
|
|||
def click(params)
|
||||
instance = params[:browser] || @browser
|
||||
instance.find_elements( { :css => params[:css] } )[0].click
|
||||
sleep 0.5
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -258,7 +259,7 @@ class TestCase < Test::Unit::TestCase
|
|||
instance.action.send_keys(key).perform
|
||||
}
|
||||
end
|
||||
sleep 0.1
|
||||
sleep 0.5
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -335,6 +336,7 @@ class TestCase < Test::Unit::TestCase
|
|||
return
|
||||
end
|
||||
instance.action.send_keys(params[:value]).perform
|
||||
sleep 0.5
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -405,6 +407,7 @@ class TestCase < Test::Unit::TestCase
|
|||
raise "not matching '#{params[:value]}' in content '#{text}' but should!"
|
||||
end
|
||||
end
|
||||
sleep 0.8
|
||||
return match
|
||||
end
|
||||
|
||||
|
@ -507,6 +510,7 @@ class TestCase < Test::Unit::TestCase
|
|||
text = element.text
|
||||
if text =~ /#{params[:value]}/i
|
||||
assert( true, "'#{params[:value]}' found in '#{text}'" )
|
||||
sleep 0.5
|
||||
return true
|
||||
end
|
||||
rescue
|
||||
|
@ -541,6 +545,7 @@ class TestCase < Test::Unit::TestCase
|
|||
element = instance.find_elements( { :css => params[:css] } )[0]
|
||||
if !element #|| element.displayed?
|
||||
assert( true, "not found" )
|
||||
sleep 1
|
||||
return true
|
||||
end
|
||||
sleep 1
|
||||
|
@ -585,6 +590,7 @@ class TestCase < Test::Unit::TestCase
|
|||
# just try again
|
||||
end
|
||||
end
|
||||
sleep 1
|
||||
assert( true, "all tasks closed" )
|
||||
end
|
||||
|
||||
|
@ -732,7 +738,7 @@ class TestCase < Test::Unit::TestCase
|
|||
(1..16).each {|loop|
|
||||
if instance.current_url =~ /#{Regexp.quote('#ticket/zoom/')}/
|
||||
assert( true, "ticket created" )
|
||||
sleep 1
|
||||
sleep 0.5
|
||||
id = instance.current_url
|
||||
id.gsub!(//, )
|
||||
id.gsub!(/^.+?\/(\d+)$/, "\\1")
|
||||
|
@ -742,6 +748,7 @@ class TestCase < Test::Unit::TestCase
|
|||
:id => id,
|
||||
:number => number,
|
||||
}
|
||||
sleep 1
|
||||
return ticket
|
||||
end
|
||||
sleep 0.5
|
||||
|
|
Loading…
Reference in a new issue