Removed not needed wait's.

This commit is contained in:
Martin Edenhofer 2013-08-11 14:06:44 +02:00
parent 1a4da30745
commit ccd831e8c9
9 changed files with 7 additions and 74 deletions

View file

@ -9,10 +9,6 @@ class AaaGettingStartedTest < TestCase
:instance => browser_instance,
:url => browser_url + '/',
:action => [
{
:execute => 'wait',
:value => 1,
},
{
:execute => 'check',
:css => '#form-master',
@ -54,12 +50,7 @@ class AaaGettingStartedTest < TestCase
},
{
:execute => 'wait',
:value => 4,
},
{
:execute => 'check',
:css => '#login',
:result => false,
:value => 3,
},
{
:execute => 'check',
@ -80,10 +71,6 @@ class AaaGettingStartedTest < TestCase
:value => 'Invite Agents',
:match_result => true,
},
{
:execute => 'wait',
:value => 4,
},
{
:execute => 'set',
:css => '#form-agent input[name="firstname"]',

View file

@ -23,10 +23,6 @@ class AgentUserManageTest < TestCase
:execute => 'click',
:css => 'a[href="#ticket_create/call_inbound"]',
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'click',
:css => '.active .customer_new',
@ -76,10 +72,6 @@ class AgentUserManageTest < TestCase
},
# call new ticket screen again
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'click',
:css => '.taskbar span[data-type="close"]',

View file

@ -37,10 +37,6 @@ class AuthTest < TestCase
{
:name => 'login',
:action => [
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#login',

View file

@ -37,10 +37,6 @@ class AuthMasterTest < TestCase
{
:name => 'login',
:action => [
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#login',
@ -82,4 +78,4 @@ class AuthMasterTest < TestCase
]
browser_single_test(tests)
end
end
end

View file

@ -11,10 +11,6 @@ class CustomerTicketCreateTest < TestCase
:execute => 'click',
:css => 'a[href="#customer_ticket_new"]',
},
{
:execute => 'wait',
:value => 3,
},
{
:execute => 'check',
:css => '.ticket-create',
@ -47,11 +43,6 @@ class CustomerTicketCreateTest < TestCase
:execute => 'wait',
:value => 3,
},
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'check',
:element => :url,

View file

@ -15,27 +15,15 @@ class PreferencesTest < TestCase
:execute => 'click',
:css => 'a[href="#profile"]',
},
{
:execute => 'wait',
:value => 1,
},
{
:execute => 'click',
:css => 'a[href="#profile/language"]',
},
{
:execute => 'wait',
:value => 1,
},
{
:execute => 'check',
:css => '#language',
:result => true,
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'select',
:css => '#language select[name="locale"]',
@ -49,11 +37,6 @@ class PreferencesTest < TestCase
:execute => 'wait',
:value => 6,
},
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'match',
:css => 'body',

View file

@ -19,10 +19,6 @@ class SettingTest < TestCase
:execute => 'click',
:css => 'a[href="#settings/security/third_party_auth"]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#auth_facebook select[name="auth_facebook"]',

View file

@ -55,15 +55,10 @@ class SignupTest < TestCase
},
{
:execute => 'wait',
:value => 4,
:value => 2,
},
# check action
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'check',
:css => '#form-signup',
@ -80,4 +75,4 @@ class SignupTest < TestCase
]
browser_single_test(tests)
end
end
end

View file

@ -211,13 +211,11 @@ puts "NOTICE #{Time.now.to_s}: " + action.inspect
elsif action[:element] == :alert
element = instance.switch_to.alert
elsif action[:execute] == 'login'
sleep 1
login = instance.find_element( { :css => '#login' } )
if !login
element = instance.find_element( { :css => '#login input[name="username"]' } )
if !element
assert( false, "(#{test[:name]}) no login box found!" )
return
end
element = instance.find_element( { :css => '#login input[name="username"]' } )
element.clear
element.send_keys( action[:username] )
element = instance.find_element( { :css => '#login input[name="password"]' } )
@ -241,13 +239,12 @@ puts "NOTICE #{Time.now.to_s}: " + action.inspect
elsif action[:execute] == 'create_ticket'
instance.find_element( { :css => 'a[href="#new"]' } ).click
instance.find_element( { :css => 'a[href="#ticket_create/call_inbound"]' } ).click
sleep 4
element = instance.find_element( { :css => '.active .ticket_create' } )
if !element
assert( false, "(#{test[:name]}) no ticket create screen found!" )
return
end
sleep 5
sleep 4
element = instance.find_element( { :css => '.active .ticket_create input[name="customer_id_autocompletion"]' } )
element.clear
element.send_keys( 'ma' )