Bug 960208 - Fix call log scrolling test. r=wlachance

This commit is contained in:
Dave Hunt 2014-01-15 20:01:04 +00:00
Родитель 43b427b1a4
Коммит 15fa96e8a7
1 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -1,8 +1,12 @@
from eideticker.test import B2GAppActionTest
from gaiatest.apps.phone.app import Phone
import time
from gaiatest.apps.phone.app import Phone
from eideticker.test import B2GAppActionTest
class Test(B2GAppActionTest):
def __init__(self, testinfo, appname, **kwargs):
B2GAppActionTest.__init__(self, testinfo, appname, **kwargs)
self.scrolldown_amount = testinfo.get('scrolldown_amount')
@ -10,12 +14,13 @@ class Test(B2GAppActionTest):
def populate_databases(self):
self.device.b2gpopulate.populate_calls(100, restart=False)
def prepare_app(self):
def launch_app(self):
phone = Phone(self.device.marionette)
phone.launch()
phone.tap_call_log_toolbar_button()
time.sleep(30) # FIXME: actually wait for call log loading modal to be gone
print "Done waitin"
time.sleep(30) # FIXME: actually wait for call log loading modal to be gone
self.log('Done waiting for call log loading modal to be gone')
call_log_container = self.device.marionette.find_element('id', 'call-log-container')
call_log_location = call_log_container.location
@ -23,7 +28,7 @@ class Test(B2GAppActionTest):
scroll_x1 = call_log_location['x'] + call_log_container.size['width'] / 2
scroll_y1 = call_log_location['y'] + (call_log_container.size['height'] -
call_log_swipe_padding)
call_log_swipe_padding)
scroll_y2 = call_log_location['y'] + call_log_swipe_padding
self.cmds = []