fix(tests): The user can manage and observe a watch only account

- The user imports a private key
- The user generates a new account from wallet and deletes it
This commit is contained in:
Stefan 2023-02-09 19:41:21 +02:00 committed by Anthony Laibe
parent b5ff5178f2
commit 2bc8fa1236
3 changed files with 11 additions and 19 deletions

View File

@ -70,6 +70,7 @@ class AddAccountPopup(Enum):
PRIVATE_KEY_INPUT: str = "mainWallet_Add_Account_Popup_Private_Key" PRIVATE_KEY_INPUT: str = "mainWallet_Add_Account_Popup_Private_Key"
ADD_ACCOUNT_BUTTON: str = "mainWallet_Add_Account_Popup_Footer_Add_Account" 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_TEMPLATE: str = "mainWindow_Add_Account_Popup_Seed_Phrase_"
SEED_PHRASE_INPUT_LAST: str = "mainWindow_Add_Account_Popup_Seed_Phrase_12"
class SharedPopup(Enum): class SharedPopup(Enum):
POPUP_CONTENT: str = "sharedPopup_Popup_Content" POPUP_CONTENT: str = "sharedPopup_Popup_Content"
@ -123,6 +124,7 @@ class StatusWalletScreen:
time.sleep(1) time.sleep(1)
click_obj_by_name(AddAccountPopup.TYPE_PRIVATE_KEY.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(AddAccountPopup.PRIVATE_KEY_INPUT.value, private_key) type(AddAccountPopup.PRIVATE_KEY_INPUT.value, private_key)
click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value) click_obj_by_name(AddAccountPopup.ADD_ACCOUNT_BUTTON.value)
@ -143,16 +145,12 @@ class StatusWalletScreen:
time.sleep(1) time.sleep(1)
click_obj_by_name(AddAccountPopup.TYPE_SEED_PHRASE.value) click_obj_by_name(AddAccountPopup.TYPE_SEED_PHRASE.value)
time.sleep(1) time.sleep(1)
for i in range(1, 5):
scroll_obj_by_name(AddAccountPopup.SCROLL_BAR.value)
time.sleep(1)
words = mnemonic.split() words = mnemonic.split()
scroll_obj_by_name(AddAccountPopup.SCROLL_BAR.value)
time.sleep(1)
scroll_obj_by_name(AddAccountPopup.SCROLL_BAR.value)
time.sleep(1)
scroll_obj_by_name(AddAccountPopup.SCROLL_BAR.value)
time.sleep(1)
input_seed_phrase(AddAccountPopup.SEED_PHRASE_INPUT_TEMPLATE.value, words) input_seed_phrase(AddAccountPopup.SEED_PHRASE_INPUT_TEMPLATE.value, words)
time.sleep(1) time.sleep(1)

View File

@ -25,28 +25,20 @@ Feature: Status Desktop Wallet
# And the collectibles are listed for the on # And the collectibles are listed for the on
# And the transactions are listed for the added account # And the transactions are listed for the added account
@mayfail
# FIXME all wallet tests are broken. Issue #9498
Scenario: The user imports a private key Scenario: The user imports a private key
When an account named "AccountPrivate" is added via private key "8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f" and authenticated using password "TesTEr16843/!@00" When an account named "AccountPrivate" is added via private key "8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f" and authenticated using password "TesTEr16843/!@00"
Then the new account "AccountPrivate" is added Then the new account "AccountPrivate" is added
@mayfail
# FIXME all wallet tests are broken. Issue #9498
Scenario: The user generates a new account from wallet and deletes it 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" When an account named "AccountGenerated" is generated and authenticated using password "TesTEr16843/!@00"
Then the new account "AccountGenerated" is added Then the new account "AccountGenerated" is added
When the user deletes the account "AccountGenerated" with password "TesTEr16843/!@00" When the user deletes the account "AccountGenerated" with password "TesTEr16843/!@00"
Then the account "AccountGenerated" is not in the list of accounts Then the account "AccountGenerated" is not in the list of accounts
@mayfail
# FIXME all wallet tests are broken. Issue #9498
Scenario: The user can import seed phrase 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" 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 Then the new account "AccountSeed" is added
@mayfail
# FIXME all wallet tests are broken. Issue #9498
Scenario: The user edits the default account Scenario: The user edits the default account
Given the user opens app settings screen Given the user opens app settings screen
And the user opens the wallet settings And the user opens the wallet settings
@ -54,8 +46,6 @@ Feature: Status Desktop Wallet
And the user edits default account to "Default" name and "#FFCA0F" color 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" Then the default account is updated to be named "DefaultStatus account" with color "#FFCA0F"
@mayfail
# FIXME all wallet tests are broken. Issue #9498
Scenario Outline: The user can manage a saved address Scenario Outline: The user can manage a saved address
When the user adds a saved address named "<name>" and address "<address>" When the user adds a saved address named "<name>" and address "<address>"
And the user toggles favourite for the saved address with name "<name>" And the user toggles favourite for the saved address with name "<name>"

View File

@ -63,6 +63,10 @@ StatusModal {
contentItem: StatusScrollView { contentItem: StatusScrollView {
id: scrollView id: scrollView
implicitWidth: contentWidth + leftPadding + rightPadding
implicitHeight: contentHeight + topPadding + bottomPadding
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
width: parent.width width: parent.width
height: { height: {