chore(@edit_account_test): add verification for delete button (#196)
This commit is contained in:
parent
e4d548a1ca
commit
22501517e4
|
@ -71,6 +71,7 @@ settingsWalletAccountDelegate_Status_account = {"container": settingsContentBase
|
|||
walletAccountViewEditAccountButton = {"container": statusDesktop_mainWindow, "objectName": "walletAccountViewEditAccountButton", "type": "StatusButton"}
|
||||
walletAccountViewAccountName = {"container": statusDesktop_mainWindow, "objectName": "walletAccountViewAccountName", "type": "StatusBaseText"}
|
||||
walletAccountViewAccountEmoji = {"container": statusDesktop_mainWindow, "objectName": "walletAccountViewAccountImage", "type": "StatusEmoji", "visible": True}
|
||||
walletAccountViewDeleteAccountButton = {"container": statusDesktop_mainWindow, "objectName": "deleteAccountButton", "type": "StatusButton"}
|
||||
|
||||
# Wallet edit network view
|
||||
settingsContentBaseScrollView_editPreviwTabBar_StatusTabBar = {"container": statusDesktop_mainWindow, "objectName": "editPreviwTabBar", "type": "StatusTabBar"}
|
||||
|
|
|
@ -57,6 +57,7 @@ class AccountDetailsView(WalletSettingsView):
|
|||
super(AccountDetailsView, self).__init__()
|
||||
self._back_button = Button('main_toolBar_back_button')
|
||||
self._edit_account_button = Button('walletAccountViewEditAccountButton')
|
||||
self._delete_account_button = Button('walletAccountViewDeleteAccountButton')
|
||||
self._wallet_account_title = TextLabel('walletAccountViewAccountName')
|
||||
self._wallet_account_emoji = QObject('walletAccountViewAccountEmoji')
|
||||
|
||||
|
@ -65,6 +66,10 @@ class AccountDetailsView(WalletSettingsView):
|
|||
self._edit_account_button.click()
|
||||
return EditAccountFromSettingsPopup().wait_until_appears()
|
||||
|
||||
@allure.step('Verify Delete button presence')
|
||||
def is_delete_account_button_present(self):
|
||||
return self._delete_account_button.is_visible
|
||||
|
||||
@allure.step('Get account name')
|
||||
def get_account_name_value(self):
|
||||
return self._wallet_account_title.text
|
||||
|
|
|
@ -53,7 +53,7 @@ def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_acc
|
|||
assert driver.waitFor(lambda: account_order.accounts[1].name == second_name)
|
||||
assert driver.waitFor(lambda: account_order.accounts[2].name == default_name)
|
||||
with step('Account order is correct in wallet'):
|
||||
wallet = main_screen.left_panel.open_wallet().wait_until_appears()
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
assert driver.waitFor(lambda: wallet.left_panel.accounts[0].name == name)
|
||||
assert driver.waitFor(lambda: wallet.left_panel.accounts[1].name == second_name)
|
||||
assert driver.waitFor(lambda: wallet.left_panel.accounts[2].name == default_name)
|
||||
|
|
|
@ -35,6 +35,8 @@ def test_settings_edit_status_account(main_screen: MainWindow, new_name):
|
|||
current_color = status_acc_view.get_account_color_value()
|
||||
account_emoji_id_after = status_acc_view.get_account_emoji_id()
|
||||
|
||||
assert not status_acc_view.is_delete_account_button_present(), \
|
||||
f"Delete button should not be present for Status account"
|
||||
assert status_acc_view.get_account_name_value() == new_name, f"Account name has not been changed"
|
||||
assert account_emoji_id_before != account_emoji_id_after, f"Account emoji has not been changed"
|
||||
assert WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_COLOR.value != current_color, \
|
||||
|
|
|
@ -7,8 +7,6 @@ from gui.components.wallet.testnet_mode_banner import TestnetModeBanner
|
|||
from gui.components.wallet.wallet_toast_message import WalletToastMessage
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = allure.suite("Wallet")
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703505', 'Network: Testnet switching')
|
||||
@pytest.mark.case(703505)
|
||||
|
|
Loading…
Reference in New Issue