Added implicit_wait for selenium tests.

This commit is contained in:
Martin Edenhofer 2013-07-15 12:22:02 +02:00
parent d25689e4b4
commit 96b2f542dc
5 changed files with 13 additions and 47 deletions

View file

@ -107,20 +107,15 @@ class AaaGettingStartedTest < TestCase
:execute => 'click',
:css => '#form-agent button[type="submit"]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'check',
:element => :url,
:result => '#getting_started',
},
{
:execute => 'wait',
:value => 2,
},
# check action
{

View file

@ -71,12 +71,7 @@ class AgentTicketActionLevel1Test < TestCase
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'check',
:css => '#login',
:result => false,
:value => 6,
},
{
:execute => 'check',
@ -202,12 +197,7 @@ class AgentTicketActionLevel1Test < TestCase
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'check',
:css => '#login',
:result => false,
:value => 6,
},
{
:execute => 'check',
@ -245,7 +235,7 @@ class AgentTicketActionLevel1Test < TestCase
},
{
:execute => 'wait',
:value => 4,
:value => 5,
},
{
:execute => 'match',

View file

@ -27,10 +27,6 @@ class AgentTicketActionsLevel2Test < TestCase
:css => '#login',
:result => false,
},
{
:execute => 'wait',
:value => 1,
},
{
:where => :instance1,
:execute => 'close_all_tasks',
@ -61,10 +57,6 @@ class AgentTicketActionsLevel2Test < TestCase
:css => '.active .ticket_create',
:result => true,
},
{
:execute => 'wait',
:value => 1,
},
{
:where => :instance1,
:execute => 'set',
@ -232,8 +224,9 @@ class AgentTicketActionsLevel2Test < TestCase
:value => '$(".active .ticket-title .ticket-title-update").blur()',
},
{
:execute => 'wait',
:value => 1,
:where => :instance2,
:execute => 'js',
:value => '$(".active .ticket-title .ticket-title-update").trigger("blur")',
},

View file

@ -27,10 +27,6 @@ class AgentTicketActionsLevel3Test < TestCase
:css => '#login',
:result => false,
},
{
:execute => 'wait',
:value => 1,
},
{
:where => :instance1,
:execute => 'close_all_tasks',
@ -61,10 +57,6 @@ class AgentTicketActionsLevel3Test < TestCase
:css => '.active .ticket_create',
:result => true,
},
{
:execute => 'wait',
:value => 1,
},
{
:where => :instance1,
:execute => 'set',
@ -112,13 +104,7 @@ class AgentTicketActionsLevel3Test < TestCase
},
{
:execute => 'wait',
:value => 5,
},
{
:where => :instance1,
:execute => 'check',
:css => '#login',
:result => false,
:value => 6,
},
{
:where => :instance1,

View file

@ -26,6 +26,7 @@ class TestCase < Test::Unit::TestCase
if !ENV['REMOTE_URL']
local_browser = Selenium::WebDriver.for( browser.to_sym )
local_browser.manage.window.resize_to(1024, 1024)
local_browser.manage.timeouts.implicit_wait = 3 # seconds
@browsers.push local_browser
return local_browser
end
@ -38,6 +39,7 @@ class TestCase < Test::Unit::TestCase
:url => ENV['REMOTE_URL'],
:desired_capabilities => caps,
)
local_browser.manage.timeouts.implicit_wait = 3 # seconds
@browsers.push local_browser
return local_browser
end