Small test improvements.
This commit is contained in:
parent
04a657b9aa
commit
8b16a5a7b8
2 changed files with 7 additions and 7 deletions
|
@ -93,16 +93,16 @@ class AaaGettingStartedTest < TestCase
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '#form-agent button[type="submit"]',
|
:css => '#form-agent button[type="submit"]',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
:execute => 'check',
|
|
||||||
:element => :url,
|
|
||||||
:result => '#getting_started',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
:execute => 'watch_for',
|
:execute => 'watch_for',
|
||||||
:area => 'body',
|
:area => 'body',
|
||||||
:value => 'Invitation sent',
|
:value => 'Invitation sent',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
:execute => 'check',
|
||||||
|
:element => :url,
|
||||||
|
:result => '#getting_started',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
:css => 'body',
|
:css => 'body',
|
||||||
|
|
|
@ -245,14 +245,14 @@ class TestCase < Test::Unit::TestCase
|
||||||
assert( false, "(#{test[:name]}) no login box found!" )
|
assert( false, "(#{test[:name]}) no login box found!" )
|
||||||
return
|
return
|
||||||
elsif action[:execute] == 'watch_for'
|
elsif action[:execute] == 'watch_for'
|
||||||
(1..24).each { |loop|
|
(1..36).each { |loop|
|
||||||
element = instance.find_element( { :css => action[:area] } )
|
element = instance.find_element( { :css => action[:area] } )
|
||||||
text = element.text
|
text = element.text
|
||||||
if text =~ /#{action[:value]}/i
|
if text =~ /#{action[:value]}/i
|
||||||
assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
sleep 0.5
|
sleep 0.33
|
||||||
}
|
}
|
||||||
assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue