chore(@desktop/ui-tests): old add account tests removed
This commit is contained in:
parent
06ba89661b
commit
706d03eec3
|
@ -60,22 +60,6 @@ class SendPopup(Enum):
|
|||
HIGH_GAS_BUTTON: str = "mainWallet_Send_Popup_GasSelector_HighGas_Button"
|
||||
|
||||
class AddAccountPopup(Enum):
|
||||
SCROLL_BAR: str = "mainWallet_Add_Account_Popup_Main"
|
||||
PASSWORD_INPUT: str = "mainWallet_Add_Account_Popup_Password"
|
||||
ACCOUNT_NAME_INPUT: str = "mainWallet_Add_Account_Popup_Account_Name"
|
||||
ADVANCE_SECTION: str = "mainWallet_Add_Account_Popup_Advanced"
|
||||
TYPE_SELECTOR: str = "mainWallet_Add_Account_Popup_Type_Selector"
|
||||
TYPE_WATCH_ONLY: str = "mainWallet_Add_Account_Popup_Type_Watch_Only"
|
||||
TYPE_SEED_PHRASE: str = "mainWallet_Add_Account_Popup_Type_Seed_Phrase"
|
||||
TYPE_PRIVATE_KEY: str = "mainWallet_Add_Account_Popup_Type_Private_Key"
|
||||
ADDRESS_INPUT: str = "mainWallet_Add_Account_Popup_Watch_Only_Address"
|
||||
ADDRESS_INPUT_PLACEHOLDER: str = "mainWallet_Add_Account_Popup_Watch_Only_Address_Placeholder"
|
||||
PRIVATE_KEY_INPUT: str = "mainWallet_Add_Account_Popup_Private_Key"
|
||||
ADD_ACCOUNT_BUTTON: str = "mainWallet_Add_Account_Popup_Footer_Add_Account"
|
||||
SEED_PHRASE_INPUT_TEMPLATE: str = "mainWindow_Add_Account_Popup_Seed_Phrase_"
|
||||
SEED_PHRASE_INPUT_LAST: str = "mainWindow_Add_Account_Popup_Seed_Phrase_12"
|
||||
FULLY_CUSTOM_PATH_CHECKBOX: str = "mainWallet_Add_Account_Popup_Advanced_Accept_Responsibility_Checkbox"
|
||||
ADD_ACCOUNT_POPUP_ROOT: str = "mainWallet_Add_Account_Popup_Root"
|
||||
|
||||
class CollectiblesView(Enum):
|
||||
COLLECTIONS_REPEATER: str = "mainWallet_Collections_Repeater"
|
||||
|
@ -98,81 +82,7 @@ class StatusWalletScreen:
|
|||
|
||||
def accept_signing_phrase(self):
|
||||
click_obj_by_name(SigningPhrasePopUp.OK_GOT_IT_BUTTON.value)
|
||||
|
||||
def add_watch_only_account(self, account_name: str, address: str, password: str):
|
||||
click_obj_by_name(MainWalletScreen.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
type_text(AddAccountPopup.ACCOUNT_NAME_INPUT.value, account_name)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADVANCE_SECTION.value, 2000)
|
||||
|
||||
# Found that all the involved controls are switching availability states very quickly based on the model data
|
||||
# which makes it almost impossible to do a reliable check for different states, hence the retry for 10 seconds
|
||||
# workaround.
|
||||
# TODO remove workaround to retry after add account modal refactoring
|
||||
max_expected_step_duration_ms = 10000
|
||||
def scroll_and_type_fn():
|
||||
try:
|
||||
click_obj_by_name(AddAccountPopup.TYPE_SELECTOR.value)
|
||||
click_obj_by_name(AddAccountPopup.TYPE_WATCH_ONLY.value)
|
||||
|
||||
scroll_item_until_item_is_visible(AddAccountPopup.SCROLL_BAR.value, AddAccountPopup.ADDRESS_INPUT_PLACEHOLDER.value, 2000)
|
||||
wait_for_object_and_type(AddAccountPopup.ADDRESS_INPUT_PLACEHOLDER.value, address)
|
||||
except Exception as e:
|
||||
log(f"Expected fail, ignore it for {max_expected_step_duration_ms/1000} seconds; exception {str(e)}")
|
||||
|
||||
do_until_validation_with_timeout(
|
||||
scroll_and_type_fn,
|
||||
lambda: is_loaded_visible_and_enabled(AddAccountPopup.ADDRESS_INPUT.value, 500)[0],
|
||||
timeout_ms=max_expected_step_duration_ms,
|
||||
message="Fill watch only account address")
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value, 2000)
|
||||
|
||||
def import_private_key(self, account_name: str, password: str, private_key: str):
|
||||
click_obj_by_name(MainWalletScreen.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
type_text(AddAccountPopup.ACCOUNT_NAME_INPUT.value, account_name)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADVANCE_SECTION.value)
|
||||
click_obj_by_name(AddAccountPopup.TYPE_SELECTOR.value)
|
||||
click_obj_by_name(AddAccountPopup.TYPE_PRIVATE_KEY.value)
|
||||
|
||||
scroll_item_until_item_is_visible(AddAccountPopup.SCROLL_BAR.value, AddAccountPopup.PRIVATE_KEY_INPUT.value)
|
||||
type_text(AddAccountPopup.PRIVATE_KEY_INPUT.value, private_key)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
authenticatePopupEnterPassword(password)
|
||||
|
||||
def import_seed_phrase(self, account_name: str, password: str, mnemonic: str):
|
||||
click_obj_by_name(MainWalletScreen.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
type_text(AddAccountPopup.ACCOUNT_NAME_INPUT.value, account_name)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADVANCE_SECTION.value)
|
||||
click_obj_by_name(AddAccountPopup.TYPE_SELECTOR.value)
|
||||
click_obj_by_name(AddAccountPopup.TYPE_SEED_PHRASE.value)
|
||||
|
||||
is_loaded_visible_and_enabled(AddAccountPopup.SCROLL_BAR.value, 1000)
|
||||
scroll_item_until_item_is_visible(AddAccountPopup.SCROLL_BAR.value, AddAccountPopup.SEED_PHRASE_INPUT_LAST.value)
|
||||
|
||||
words = mnemonic.split()
|
||||
input_seed_phrase(AddAccountPopup.SEED_PHRASE_INPUT_TEMPLATE.value, words)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
authenticatePopupEnterPassword(password)
|
||||
|
||||
def generate_new_account(self, account_name: str, password: str):
|
||||
click_obj_by_name(MainWalletScreen.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
type_text(AddAccountPopup.ACCOUNT_NAME_INPUT.value, account_name)
|
||||
|
||||
click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value)
|
||||
|
||||
authenticatePopupEnterPassword(password)
|
||||
|
||||
|
||||
def send_transaction(self, account_name, amount, token, chain_name, password):
|
||||
is_loaded_visible_and_enabled(AssetView.LIST.value, 2000)
|
||||
list = get_obj(AssetView.LIST.value)
|
||||
|
|
|
@ -37,35 +37,6 @@ mainWallet_Send_Popup_Asset_List = {"container": statusDesktop_mainWindow, "obje
|
|||
mainWallet_Send_Popup_GasPrice_Input = {"container": statusDesktop_mainWindow, "objectName": "gasPriceSelectorInput", "type": "StyledTextField"}
|
||||
|
||||
# Add account popup:
|
||||
mainWallet_Add_Account_Popup_Main = {"container": statusDesktop_mainWindow, "objectName": "AddAccountModalContent", "type": "StatusScrollView", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Password = {"container": mainWallet_Add_Account_Popup_Main, "text": "Enter your password...", "type": "PlaceholderText", "unnamed": 1, "visible": True}
|
||||
mainWallet_Add_Account_Popup_Advanced = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "ExpandableItem", "type": "MouseArea", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Type_Selector = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "selectGeneratedAccount", "type": "SelectGeneratedAccount", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Type_Watch_Only = {"container": statusDesktop_mainWindow, "objectName": "watchOnlyAccount", "type": "StatusListItem", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Type_Private_Key = {"container": statusDesktop_mainWindow, "objectName": "generateFromPrivateKey", "type": "StatusListItem", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Type_Seed_Phrase = {"container": statusDesktop_mainWindow, "objectName": "importNewSeedPhrase", "type": "StatusListItem", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Account_Name = {"container": mainWallet_Add_Account_Popup_Main, "text": "Enter an account name...", "type": "StatusBaseText", "unnamed": 1, "visible": True}
|
||||
mainWallet_Add_Account_Popup_Root = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "advancedAddAccountViewRoot", "type": "AdvancedAddAccountView", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Watch_Only_Address = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "advancedAddAccountViewAddressInput", "type": "StatusBaseInput", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Watch_Only_Address_Placeholder = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "advancedAddAccountViewAddressInputPlaceholder", "type": "StatusBaseText", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Private_Key = {"container": mainWallet_Add_Account_Popup_Main, "text": "Paste the contents of your private key", "type": "StatusBaseText", "unnamed": 1, "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_1 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder0", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_2 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder1", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_3 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder2", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_4 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder3", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_5 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder4", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_6 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder5", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_7 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder6", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_8 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder7", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_9 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder8", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_10 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder9", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_11 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder10", "visible": True}
|
||||
mainWindow_Add_Account_Popup_Seed_Phrase_12 = {"container": mainWallet_Add_Account_Popup_Main, "type": "StatusBaseText", "objectName": "seedPhraseInputPlaceholder11", "visible": True}
|
||||
mainWallet_Add_Account_Popup_Advanced_Accept_Responsibility_Checkbox = {"container": mainWallet_Add_Account_Popup_Main, "objectName": "fullyCustomPathCheckBox", "type": "StatusCheckBox", "visible": True}
|
||||
|
||||
mainWallet_Add_Account_Popup_Footer = {"container": statusDesktop_mainWindow, "type": "StatusModalFooter", "unnamed": 1, "visible": True}
|
||||
mainWallet_Authenticate_Popup_Footer_Add_Account = {"container": mainWallet_Add_Account_Popup_Footer, "text": "Authenticate", "type": "StatusBaseText", "unnamed": 1, "visible": True}
|
||||
mainWallet_Add_Account_Popup_Footer_Add_Account = {"container": mainWallet_Add_Account_Popup_Footer, "text": "Add account", "type": "StatusBaseText", "unnamed": 1, "visible": True}
|
||||
|
||||
# saved address view
|
||||
mainWallet_Saved_Addreses_Add_Buttton = {"container": statusDesktop_mainWindow, "objectName": "addNewAddressBtn", "type": "StatusButton"}
|
||||
|
|
|
@ -15,36 +15,10 @@ _walletScreen = StatusWalletScreen()
|
|||
@Given("the user accepts the signing phrase")
|
||||
def step(context):
|
||||
the_user_accepts_the_signing_phrase()
|
||||
|
||||
@Given("the user clicks on the first account")
|
||||
def step(context):
|
||||
_walletScreen.click_first_account()
|
||||
|
||||
@Given("the user opens wallet screen")
|
||||
def step(context):
|
||||
wallet_init_steps.the_user_opens_wallet_screen()
|
||||
|
||||
#########################
|
||||
### ACTIONS region:
|
||||
#########################
|
||||
|
||||
@When("the user adds watch only account \"|any|\" named \"|any|\" and authenticated using password \"|any|\"")
|
||||
@verify_screenshot
|
||||
def step(context, address, account_name, root_password):
|
||||
_walletScreen.add_watch_only_account(account_name, address, root_password)
|
||||
|
||||
@When("an account named \"|any|\" is generated and authenticated using password \"|any|\"")
|
||||
def step(context, account_name, password):
|
||||
_walletScreen.generate_new_account(account_name, password)
|
||||
|
||||
@When("an account named \"|any|\" is added via private key \"|any|\" and authenticated using password \"|any|\"")
|
||||
def step(context, account_name, private_key, password):
|
||||
_walletScreen.import_private_key(account_name, password, private_key)
|
||||
|
||||
@When("an account named \"|any|\" is added via imported seed phrase \"|any|\" and authenticated using password \"|any|\"")
|
||||
def step(context, account_name, mnemonic, password):
|
||||
_walletScreen.import_seed_phrase(account_name, password, mnemonic)
|
||||
|
||||
@When("the user sends a transaction to himself from account \"|any|\" of \"|any|\" \"|any|\" on \"|any|\" with password \"|any|\"")
|
||||
def step(context, account_name, amount, token, chain_name, password):
|
||||
_walletScreen.send_transaction(account_name, amount, token, chain_name, password)
|
||||
|
@ -78,9 +52,6 @@ def step(context, network_name):
|
|||
def step(context, symbol):
|
||||
_walletScreen.verify_positive_balance(symbol)
|
||||
|
||||
@Then("the new account \"|any|\" is added")
|
||||
def step(context, account_name):
|
||||
_walletScreen.verify_account_name_is_present(account_name)
|
||||
|
||||
@Then("the transaction is in progress")
|
||||
def step(context):
|
||||
|
|
|
@ -7,48 +7,12 @@ Feature: Status Desktop Wallet
|
|||
** given A first time user lands on the status desktop and generates new key
|
||||
** when user signs up with username "tester123" and password "TesTEr16843/!@00"
|
||||
** and the user lands on the signed in app
|
||||
|
||||
** given the user opens app settings screen
|
||||
** and the user opens the wallet section
|
||||
** and the user accepts the signing phrase
|
||||
|
||||
Background: Navigation to main wallet screen
|
||||
|
||||
Given the user opens wallet screen
|
||||
And the user clicks on the first account
|
||||
|
||||
@mayfail
|
||||
Scenario: The user can manage and observe a watch only account
|
||||
When the user adds watch only account "0xea123F7beFF45E3C9fdF54B324c29DBdA14a639A" named "AccountWatch" and authenticated using password "TesTEr16843/!@00"
|
||||
Then the new account "AccountWatch" is added
|
||||
And the user has a positive balance of "ETH"
|
||||
And the user has a positive balance of "SNT"
|
||||
# And the collectibles are listed for the on
|
||||
# And the transactions are listed for the added account
|
||||
|
||||
@mayfail
|
||||
Scenario: The user imports a private key
|
||||
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" with password "TesTEr16843/!@00"
|
||||
Then the account "AccountGenerated" is not in the list of accounts
|
||||
|
||||
@mayfail
|
||||
Scenario: The user can import seed phrase
|
||||
When an account named "AccountSeed" is added via imported seed phrase "pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial" and authenticated using password "TesTEr16843/!@00"
|
||||
Then the new account "AccountSeed" is added
|
||||
|
||||
Scenario: The user edits the default account
|
||||
Given the user opens app settings screen
|
||||
And the user opens the wallet settings
|
||||
When the user selects the default account
|
||||
And the user edits default account to "Default" name and "#FFCA0F" color
|
||||
Then the default account is updated to be named "DefaultStatus account" with color "#FFCA0F"
|
||||
#############################################
|
||||
# WALLET SECTION PART
|
||||
#############################################
|
||||
|
||||
Scenario Outline: The user can manage a saved address
|
||||
When the user adds a saved address named "<name>" and address "<address>"
|
||||
|
@ -65,3 +29,15 @@ Feature: Status Desktop Wallet
|
|||
Examples:
|
||||
| name | address | new_name |
|
||||
| bar | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | foo |
|
||||
|
||||
|
||||
#############################################
|
||||
# WALLET SETTINGS PART
|
||||
#############################################
|
||||
|
||||
Scenario: The user edits the default account
|
||||
Given the user opens app settings screen
|
||||
And the user opens the wallet settings
|
||||
When the user selects the default account
|
||||
And the user edits default account to "Default" name and "#FFCA0F" color
|
||||
Then the default account is updated to be named "DefaultStatus account" with color "#FFCA0F"
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue