Changes: improve perf test to detect failure in getcoordinates.rb

RevBy: Marek Ruszczak
pull/1/head
Thyagarajan Balakrishnan 14 years ago
parent e4146389fa
commit 14da0eed43

1
debian/changelog vendored

@ -1,6 +1,7 @@
applauncherd (2.0.14) unstable; urgency=low
* Changes: updated some test cases in art-tests and test package dependencies
* Changes: improve perf test to detect failure
-- Thyagarajan Balakrishnan <ext-thyagarajan.1.balarishnan@nokia.com> Wed, 23 Nov 2011 17:50:32 +0200

@ -125,6 +125,7 @@ system "mcetool --unblank-screen > /dev/null"
# Application grid should be now visible
if options[:grid]
puts "Exiting as grid is true"
exit 0;
end
@ -132,27 +133,34 @@ end
sleep(2)
if @meegoHome.test_object_exists?(:text => appName)
icon = @meegoHome.SwipeLauncherButton(:text => appName)
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
@meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 350)
sleep(0.2)
icon.refresh
end
xpos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('x')
xpos = xpos.to_i + 59
ypos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('y')
ypos = ypos.to_i + 58
@pos = "#{xpos}x#{ypos}"
#run loop 4 times (4 seconds)
4.times do
if @meegoHome.test_object_exists?(:text => appName)
icon = @meegoHome.SwipeLauncherButton(:text => appName)
puts @pos
exit 0
else
#icon does not
#raise error and exit
raise "Application not found in Application grid"
exit 1
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
@meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 350)
sleep(0.2)
icon.refresh
end
xpos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('x')
xpos = xpos.to_i + 59
ypos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('y')
ypos = ypos.to_i + 58
@pos = "#{xpos}x#{ypos}"
puts @pos
exit 0 #exit gracefully
end
sleep(1)
end
#icon does not exist
#raise error and exit
puts "app not found"
raise "Application not found in Application grid"
exit 1

Loading…
Cancel
Save