chore: fix test for sending transaction

This commit is contained in:
Anastasiya Semenkevich 2024-09-24 12:18:09 +03:00 committed by Iuri Matias
parent acb1ce0115
commit 470f261c47
4 changed files with 8 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class SendPopup(BasePopup):
self._fiat_fees_label = TextLabel(names.fiatFees_StatusBaseText)
self._send_button = Button(names.send_StatusFlatButton)
self._account_selector = QObject(names.accountSelector_AccountSelectorHeader)
self._holding_selector = QObject(names.holdingSelector_TokenSelectorNew)
self._holding_selector = Button(names.tokenSelectorButton)
@allure.step('Wait until appears {0}')
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):

View File

@ -1,12 +1,13 @@
import driver
from gui.components.base_popup import BasePopup
from gui.elements.object import QObject
from gui.elements.text_edit import TextEdit
from gui.objects_map import names
class TokenSelectorPopup(QObject):
class TokenSelectorPopup(BasePopup):
def __init__(self):
super().__init__(names.tokenSelectorPanel_TokenSelectorNew)
super().__init__()
self.token_selector_panel = QObject(names.tokenSelectorPanel_TokenSelectorNew)
self.tab_bar = QObject(names.tokensTabBar_StatusTabBar)
self.assets_tab = QObject(names.tokenSelectorPanel_AssetsTab)
@ -19,7 +20,7 @@ class TokenSelectorPopup(QObject):
assets_list = driver.findAllObjects(self.asset_list_item.real_name)
assert assets_list, f'Assets are not displayed'
for item in assets_list:
if getattr(item, 'tokensKey', '') == asset_name:
if getattr(item, 'symbol', '') == asset_name:
QObject(item).click()
break
return self

View File

@ -543,6 +543,7 @@ networkSelectorDelegate_Arbitrum_NetworkSelectItemDelegate = {"container": statu
# Bridge popup
holdingSelector_TokenSelectorNew = {"container": statusDesktop_mainWindow_overlay, "objectName": "holdingSelector", "type": "TokenSelectorNew", "visible": True}
tokenSelectorButton = {"container": statusDesktop_mainWindow_overlay, "id": "tokenSelectorButton", "type": "TokenSelectorButton", "unnamed": 1, "visible": True}
modalHeader_HeaderTitleText = {"container": statusDesktop_mainWindow_overlay, "objectName": "modalHeader", "type": "HeaderTitleText", "visible": True}
# Token Selector popup

View File

@ -11,6 +11,8 @@ import utils 1.0
ItemDelegate {
id: root
objectName: "tokenSelectorAssetDelegate_" + name
required property string name
required property string symbol
required property string currencyBalanceAsString