Fixed e2e tests
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
03243e4916
commit
8f1610527b
|
@ -75,7 +75,7 @@ class TestProfileView(SingleDeviceTestCase):
|
||||||
profile_view.edit_profile_picture(file_name='sauce_logo.png')
|
profile_view.edit_profile_picture(file_name='sauce_logo.png')
|
||||||
profile_view.relogin()
|
profile_view.relogin()
|
||||||
sign_in_view.profile_button.click()
|
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():
|
if not profile_view.profile_picture.is_element_image_equals_template():
|
||||||
pytest.fail('Profile picture was not updated')
|
pytest.fail('Profile picture was not updated')
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,9 @@ class BaseView(object):
|
||||||
element.locator = element.Locator.xpath_selector("//*[starts-with(@text,'%s')]" % text)
|
element.locator = element.Locator.xpath_selector("//*[starts-with(@text,'%s')]" % text)
|
||||||
return element.wait_for_element(wait_time)
|
return element.wait_for_element(wait_time)
|
||||||
|
|
||||||
|
def swipe_down(self):
|
||||||
|
self.driver.swipe(500, 500, 500, 1000)
|
||||||
|
|
||||||
def get_home_view(self):
|
def get_home_view(self):
|
||||||
from views.home_view import HomeView
|
from views.home_view import HomeView
|
||||||
return HomeView(self.driver)
|
return HomeView(self.driver)
|
||||||
|
|
|
@ -166,7 +166,8 @@ class ViewProfileButton(BaseButton):
|
||||||
class NoMessagesInChatText(BaseText):
|
class NoMessagesInChatText(BaseText):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(NoMessagesInChatText, self).__init__(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):
|
class ProfileSendMessageButton(BaseButton):
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
@ -102,7 +102,7 @@ class UserNameText(BaseText):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(UserNameText, self).__init__(driver)
|
super(UserNameText, self).__init__(driver)
|
||||||
self.locator = self.Locator.xpath_selector(
|
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):
|
class ShareMyContactKeyButton(BaseButton):
|
||||||
|
|
|
@ -175,7 +175,7 @@ class WalletView(BaseView):
|
||||||
elif self.get_eth_value() == initial_balance:
|
elif self.get_eth_value() == initial_balance:
|
||||||
counter += 10
|
counter += 10
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
self.driver.swipe(500, 500, 500, 1000)
|
self.swipe_down()
|
||||||
info('Waiting %s seconds for ETH update' % counter)
|
info('Waiting %s seconds for ETH update' % counter)
|
||||||
else:
|
else:
|
||||||
info('Transaction received, balance updated!')
|
info('Transaction received, balance updated!')
|
||||||
|
|
Loading…
Reference in New Issue