false failures fixes

Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
Anton Danchenko 2019-03-21 13:36:09 +02:00
parent 1edc39e46f
commit cf21763a97
No known key found for this signature in database
GPG Key ID: C2D4819B698627E4
6 changed files with 9 additions and 11 deletions

View File

@ -151,7 +151,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile_view.get_back_to_home_view()
wallet_view = profile_view.wallet_button.click()
wallet_view.set_up_wallet()
if 'EUR' != wallet_view.currency_text.text:
if not wallet_view.find_text_part('EUR'):
pytest.fail('EUR currency is not displayed')
@marks.testrail_id(5431)

View File

@ -50,10 +50,8 @@ class TestBrowsing(SingleDeviceTestCase):
browsing_view.url_edit_box_lock_icon.click()
browsing_view.find_full_text(connection_is_secure_text)
browsing_view.cross_icon.click()
start_new_chat_view = home_view.plus_button.click()
start_new_chat_view.open_d_app_button.click()
start_new_chat_view.element_by_text('Airswap').click()
start_new_chat_view.open_button.click()
start_new_chat.element_by_text('Airswap').click()
browsing_view.url_edit_box_lock_icon.click()
browsing_view.find_full_text(connection_is_secure_text)

View File

@ -285,7 +285,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
wallet_address = wallet.get_wallet_address()
recipient = '0x' + basic_user['address']
wallet.send_transaction(asset_name='ethro', amount=0, recipient=recipient, sign_transaction=False)
wallet.send_transaction(asset_name='ETHro', amount=0, recipient=recipient, sign_transaction=False)
send_transaction_view = SendTransactionView(self.driver)
warning = 'No "Not enough ETH for gas" warning appeared while {}'
@ -321,7 +321,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
self.network_api.verify_balance_is_updated(initial_balance=0, recipient_address=wallet_address[2:])
wallet = home_view.wallet_button.click()
wallet.send_transaction(asset_name='ethro', amount=0.1, recipient=recipient, sign_transaction=False)
wallet.send_transaction(asset_name='ETHro', amount=0.1, recipient=recipient, sign_transaction=False)
# Check whether sending all available ETH triggers the warning
if not send_transaction_view.validation_warnings.not_enough_eth_for_gas.is_element_displayed():

View File

@ -43,7 +43,7 @@ class AllowButton(BaseButton):
class DenyButton(BaseButton):
def __init__(self, driver):
super(DenyButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector("//*[@text='DENY']")
self.locator = self.Locator.xpath_selector("//*[@text='Deny']")
class DeleteButton(BaseButton):
@ -157,7 +157,7 @@ class SaveButton(BaseButton):
def __init__(self, driver):
super(SaveButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
"//android.widget.TextView[@text='SAVE']")
"//android.widget.TextView[@text='Save']")
class NextButton(BaseButton):

View File

@ -395,7 +395,7 @@ class ActiveNetworkName(BaseText):
def __init__(self, driver):
super(ActiveNetworkName, self).__init__(driver)
self.locator = self.Locator.text_part_selector('WITH UPSTREAM RPC')
self.locator = self.Locator.text_part_selector('with upstream RPC')
class AboutButton(BaseButton):

View File

@ -271,7 +271,7 @@ class WalletView(BaseView):
def send_transaction(self, **kwargs):
send_transaction_view = self.send_transaction_button.click()
send_transaction_view.select_asset_button.click()
asset_name = kwargs.get('asset_name', 'ETHro').upper()
asset_name = kwargs.get('asset_name', 'ETHro')
asset_button = send_transaction_view.asset_by_name(asset_name)
send_transaction_view.select_asset_button.click_until_presence_of_element(asset_button)
asset_button.click()