nightly e2e fixes

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-11-09 16:27:43 +01:00
parent 07e36096cc
commit f7d7c282cd
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
4 changed files with 13 additions and 7 deletions

View File

@ -253,7 +253,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
chat_name = devices_home[0].get_random_chat_name()
devices_chat[0].just_fyi('Create group chats without members')
devices_home[0].just_fyi('Create group chats without members')
devices_chat[0] = devices_home[0].create_group_chat([], chat_name)
link = devices_chat[0].get_group_invite_via_group_info()
devices_chat[0].get_back_to_home_view()

View File

@ -93,7 +93,7 @@ class TestDApps(SingleDeviceTestCase):
if not status_test_dapp.element_by_text(account_name).is_element_displayed():
self.errors.append("No expected account %s is shown in authorize web3 popup for wallet" % account_name)
status_test_dapp.allow_button.wait_and_click()
dapp_view.profile_button.click()
dapp_view.profile_button.click(desired_element_text='DApp permissions')
profile_view.element_by_text(test_dapp_name).click()
for text in 'Chat key', account_name:
if not dapp_view.element_by_text(text).is_element_displayed():
@ -110,7 +110,6 @@ class TestDApps(SingleDeviceTestCase):
sign_in_view.just_fyi('Relogin and check multiaccount loads fine')
send_transaction_view.cancel_button.click()
sign_in_view.profile_button.click()
sign_in_view.get_back_to_home_view()
sign_in_view.relogin()
sign_in_view.wallet_button.click()
if not wallet_view.element_by_text(account_name).is_element_displayed():

View File

@ -149,8 +149,8 @@ class DappTabButton(TabButton):
return DappsView(self.driver)
def click(self):
from views.dapps_view import EnterUrlEditbox
self.click_until_presence_of_element(EnterUrlEditbox(self.driver))
from views.dapps_view import SelectAccountButton
self.click_until_presence_of_element(SelectAccountButton(self.driver))
return self.navigate()
@ -179,9 +179,13 @@ class ProfileButton(TabButton):
from views.profile_view import ProfileView
return ProfileView(self.driver)
def click(self):
def click(self, desired_element_text = 'privacy'):
from views.profile_view import PrivacyAndSecurityButton
self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver))
if desired_element_text == 'privacy':
self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver))
else:
base_view = BaseView(self.driver)
self.click_until_presence_of_element(base_view.element_by_text_part(desired_element_text))
return self.navigate()

View File

@ -10,6 +10,9 @@ class OptionsButton(BaseButton):
self.locator = self.Locator.xpath_selector(
'(//android.view.ViewGroup[@content-desc="icon"])[2]')
def click(self):
self.click_until_presence_of_element(OptionsButton.CopyTransactionHashButton(self.driver))
class CopyTransactionHashButton(BaseButton):
def __init__(self, driver):
super(OptionsButton.CopyTransactionHashButton, self).__init__(driver)