fix(@test): enable back delete account

This commit is contained in:
Anthony Laibe 2023-02-03 13:22:02 +01:00 committed by Anthony Laibe
parent 46d4193bbd
commit 6e188de21a
3 changed files with 13 additions and 6 deletions

View File

@ -128,6 +128,11 @@ class BackupSeedPhrasePopup(Enum):
CONFIRM_SECOND_WORD_INPUT: str = "backup_seed_phrase_popup_BackupSeedStepBase_confirmSecondWord_inputText"
CONFIRM_YOU_STORED_CHECKBOX: str = "backup_seed_phrase_popup_ConfirmStoringSeedPhrasePanel_storeCheck"
CONFIRM_YOU_STORED_BUTTON: str = "backup_seed_phrase_popup_BackupSeedModal_completeAndDeleteSeedPhraseButton"
class SharedPopup(Enum):
POPUP_CONTENT: str = "sharedPopup_Popup_Content"
PASSWORD_INPUT: str = "sharedPopup_Password_Input"
PRIMARY_BUTTON: str = "sharedPopup_Primary_Button"
class SettingsScreen:
__pid = 0
@ -148,7 +153,7 @@ class SettingsScreen:
self.activate_wallet_option()
click_obj_by_name(MainScreenComponents.WALLET_BUTTON.value)
def delete_account(self, account_name: str):
def delete_account(self, account_name: str, password: str):
self.open_wallet_settings()
index = self._find_account_index(account_name)
@ -161,6 +166,9 @@ class SettingsScreen:
click_obj_by_name(WalletSettingsScreen.DELETE_ACCOUNT.value)
click_obj_by_name(WalletSettingsScreen.DELETE_ACCOUNT_CONFIRM.value)
wait_for_object_and_type(SharedPopup.PASSWORD_INPUT.value, password)
click_obj_by_name(SharedPopup.PRIMARY_BUTTON.value)
def verify_no_account(self, account_name: str):
index = self._find_account_index(account_name)
verify_equal(index, -1)

View File

@ -95,10 +95,10 @@ def step(context: any):
def step(context: any):
the_user_opens_the_wallet_settings()
@When("the user deletes the account \"|any|\"")
def step(context: any, account_name: str):
@When("the user deletes the account \"|any|\" with password \"|any|\"")
def step(context: any, account_name: str, password: str):
_statusMain.open_settings()
_settingsScreen.delete_account(account_name)
_settingsScreen.delete_account(account_name, password)
@When("the user selects the default account")
def step(context: any):

View File

@ -30,11 +30,10 @@ Feature: Status Desktop Wallet
When an account named "AccountPrivate" is added via private key "8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f" and authenticated using password "TesTEr16843/!@00"
Then the new account "AccountPrivate" is added
@mayfail
Scenario: The user generates a new account from wallet and deletes it
When an account named "AccountGenerated" is generated and authenticated using password "TesTEr16843/!@00"
Then the new account "AccountGenerated" is added
When the user deletes the account "AccountGenerated"
When the user deletes the account "AccountGenerated" with password "TesTEr16843/!@00"
Then the account "AccountGenerated" is not in the list of accounts
Scenario: The user can import seed phrase