chore: fix test for sending transaction

This commit is contained in:
Anastasiya Semenkevich 2024-09-24 12:18:09 +03:00 committed by Anastasiya
parent ca042f91ef
commit a7eb8d9c77
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._fiat_fees_label = TextLabel(names.fiatFees_StatusBaseText)
self._send_button = Button(names.send_StatusFlatButton) self._send_button = Button(names.send_StatusFlatButton)
self._account_selector = QObject(names.accountSelector_AccountSelectorHeader) 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}') @allure.step('Wait until appears {0}')
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):

View File

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

View File

@ -543,6 +543,7 @@ networkSelectorDelegate_Arbitrum_NetworkSelectItemDelegate = {"container": statu
# Bridge popup # Bridge popup
holdingSelector_TokenSelectorNew = {"container": statusDesktop_mainWindow_overlay, "objectName": "holdingSelector", "type": "TokenSelectorNew", "visible": True} 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} modalHeader_HeaderTitleText = {"container": statusDesktop_mainWindow_overlay, "objectName": "modalHeader", "type": "HeaderTitleText", "visible": True}
# Token Selector popup # Token Selector popup

View File

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