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