Fixed e2e tests

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-06-08 12:02:54 +02:00
parent 03243e4916
commit 8f1610527b
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
6 changed files with 8 additions and 4 deletions

View File

@ -75,7 +75,7 @@ class TestProfileView(SingleDeviceTestCase):
profile_view.edit_profile_picture(file_name='sauce_logo.png')
profile_view.relogin()
sign_in_view.profile_button.click()
self.driver.swipe(500, 500, 500, 1000)
profile_view.swipe_down()
if not profile_view.profile_picture.is_element_image_equals_template():
pytest.fail('Profile picture was not updated')

View File

@ -254,6 +254,9 @@ class BaseView(object):
element.locator = element.Locator.xpath_selector("//*[starts-with(@text,'%s')]" % text)
return element.wait_for_element(wait_time)
def swipe_down(self):
self.driver.swipe(500, 500, 500, 1000)
def get_home_view(self):
from views.home_view import HomeView
return HomeView(self.driver)

View File

@ -166,7 +166,8 @@ class ViewProfileButton(BaseButton):
class NoMessagesInChatText(BaseText):
def __init__(self, driver):
super(NoMessagesInChatText, self).__init__(driver)
self.locator = self.Locator.text_part_selector('There are no messages')
self.locator = self.Locator.text_part_selector(
'Any messages you send here are encrypted and can only be read by you and')
class ProfileSendMessageButton(BaseButton):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -102,7 +102,7 @@ class UserNameText(BaseText):
def __init__(self, driver):
super(UserNameText, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
'//android.widget.ImageView[@content-desc="chat-icon"]/../android.widget.TextView')
'//android.widget.ImageView[@content-desc="chat-icon"]/../../android.widget.TextView')
class ShareMyContactKeyButton(BaseButton):

View File

@ -175,7 +175,7 @@ class WalletView(BaseView):
elif self.get_eth_value() == initial_balance:
counter += 10
time.sleep(10)
self.driver.swipe(500, 500, 500, 1000)
self.swipe_down()
info('Waiting %s seconds for ETH update' % counter)
else:
info('Transaction received, balance updated!')