- "id": "edit" removed in object names
- closing app improves via waiting for close context
- attempts added for unstable actions on UI
- detach application with waiting for process close added
This commit is contained in:
Vladimir Druzhinin 2023-06-02 16:34:09 +02:00 committed by GitHub
parent a0a5e6d219
commit a1f3485f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 128 additions and 88 deletions

View File

@ -46,7 +46,7 @@ class ExecutableAut(AbstractAut):
self.fp = fp
def start(self, *args) -> 'ExecutableAut':
cmd = ' '.join([self.fp.name] + [str(arg) for arg in args])
cmd = ' '.join([self.fp.name] + list(args))
self.ctx = squish.startApplication(cmd)
local_system.wait_for_started(self.fp.stem)
assert squish.waitFor(lambda: self.ctx.isRunning, configs.squish.APP_LOAD_TIMEOUT_MSEC)

View File

@ -2,9 +2,10 @@ import time
import configs
import squish
import utils
def attach(aut_name: str, timeout_sec: int = 30):
def attach(aut_name: str, timeout_sec: int = configs.squish.PROCESS_TIMEOUT_SEC):
print(f'Attaching squish to {aut_name}')
started_at = time.monotonic()
while True:
@ -15,13 +16,14 @@ def attach(aut_name: str, timeout_sec: int = 30):
except RuntimeError as err:
print(err)
time.sleep(1)
assert time.monotonic() - started_at > timeout_sec, f'Attach error: {aut_name}'
assert time.monotonic() - started_at < timeout_sec, f'Attach error: {aut_name}'
def detach():
def detach(timeout_sec: int = configs.squish.PROCESS_TIMEOUT_SEC):
for ctx in squish.applicationContextList():
started_at = time.monotonic()
ctx.detach()
assert squish.waitFor(
lambda: not ctx.isRunning, configs.squish.PROCESS_TIMEOUT_MSEC), 'Detach application failed'
# TODO: close by ctx.pid and then detach
time.sleep(5)
while ctx.isRunning and time.monotonic() - started_at < timeout_sec:
time.sleep(1)
utils.local_system.kill_process(configs.path.AUT.name)

View File

@ -24,6 +24,10 @@ class BaseElement:
@property
def existent(self):
return squish.waitForObjectExists(self.object_name, configs.squish.UI_LOAD_TIMEOUT_MSEC)
@property
def exists(self):
return object.exists(self.object_name)
@property
def bounds(self) -> squish.UiTypes.ScreenRectangle:
@ -72,6 +76,7 @@ class BaseElement:
def hover(self):
squish.mouseMove(self.center.x, self.center.y)
return self
def open_context_menu(
self,

View File

@ -3,6 +3,7 @@ import time
import sys
from drivers.SquishDriver import *
from drivers.SquishDriverVerification import *
from utils.decorators import attempt
class MainCommunityPortalScreen(Enum):
CREATE_COMMUNITY_BUTTON: str = "communitiesPortalLayoutContainer_createCommunityButton_StatusButton"
@ -21,12 +22,20 @@ class StatusCommunityPortalScreen:
def __init__(self):
verify_screen(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
def create_community(self, communityName: str, communityDescription: str, introMessage: str, outroMessage: str):
@attempt(2)
def open_create_community_bunner(self):
click_obj_by_name(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
BaseElement(MainCommunityPortalScreen.CREATE_COMMUNITY_BANNER_BUTTON.value).wait_until_appears()
@attempt(2)
def open_create_community_popup(self):
click_obj_by_name(MainCommunityPortalScreen.CREATE_COMMUNITY_BANNER_BUTTON.value)
BaseElement(CreateCommunityPopup.COMMUNITY_NAME_INPUT.value).wait_until_appears()
def create_community(self, communityName: str, communityDescription: str, introMessage: str, outroMessage: str):
self.open_create_community_bunner()
self.open_create_community_popup()
type_text(CreateCommunityPopup.COMMUNITY_NAME_INPUT.value, communityName)
type_text(CreateCommunityPopup.COMMUNITY_DESCRIPTION_INPUT.value, communityDescription)

View File

@ -160,9 +160,16 @@ class StatusCommunityScreen:
return result
def _open_edit_channel_popup(self):
def _open_edit_channel_popup(self, attempt: int = 2):
click_obj_by_name(CommunityScreenComponents.CHAT_MORE_OPTIONS_BUTTON.value)
click_obj_by_name(CommunityScreenComponents.EDIT_CHANNEL_MENU_ITEM.value)
try:
TextEdit(CreateOrEditCommunityChannelPopup.COMMUNITY_CHANNEL_NAME_INPUT.value).wait_until_appears()
except:
if attempt:
self._open_edit_channel_popup(attempt-1)
else:
raise err
def _open_category_edit_popup(self, category):
# For some reason it clicks on a first channel in category instead of category
@ -205,8 +212,7 @@ class StatusCommunityScreen:
self._open_edit_channel_popup()
# Select all text in the input before typing
wait_for_object_and_type(CreateOrEditCommunityChannelPopup.COMMUNITY_CHANNEL_NAME_INPUT.value, "<Ctrl+a>")
type_text(CreateOrEditCommunityChannelPopup.COMMUNITY_CHANNEL_NAME_INPUT.value, new_community_channel_name)
TextEdit(CreateOrEditCommunityChannelPopup.COMMUNITY_CHANNEL_NAME_INPUT.value).text = new_community_channel_name
click_obj_by_name(CreateOrEditCommunityChannelPopup.COMMUNITY_CHANNEL_SAVE_OR_CREATE_BUTTON.value)
time.sleep(0.5)
@ -314,10 +320,16 @@ class StatusCommunityScreen:
def go_back_to_community(self):
click_obj_by_name(CommunitySettingsComponents.BACK_TO_COMMUNITY_BUTTON.value)
def delete_current_community_channel(self):
click_obj_by_name(CommunityScreenComponents.CHAT_MORE_OPTIONS_BUTTON.value)
click_obj_by_name(CommunityScreenComponents.DELETE_CHANNEL_MENU_ITEM.value)
click_obj_by_name(CommunityScreenComponents.DELETE_CHANNEL_CONFIRMATION_DIALOG_DELETE_BUTTON.value)
def delete_current_community_channel(self, attempt: int = 2):
try:
BaseElement(CommunityScreenComponents.CHAT_MORE_OPTIONS_BUTTON.value).click()
BaseElement(CommunityScreenComponents.DELETE_CHANNEL_MENU_ITEM.value).click()
BaseElement(CommunityScreenComponents.DELETE_CHANNEL_CONFIRMATION_DIALOG_DELETE_BUTTON.value).click()
except:
if attempt:
delete_current_community_channel(attempt-1)
else:
raise
def check_channel_count(self, count_to_check: int):
chatListObj = get_obj(CommunityScreenComponents.NOT_CATEGORIZED_CHAT_LIST.value)

View File

@ -142,9 +142,16 @@ class LeftPanel(BaseElement):
else:
raise
def open_add_account_popup(self):
def open_add_account_popup(self, attempt: int = 2):
self._add_account_button.click()
return AccountPopup().wait_until_appears()
try:
return AccountPopup().wait_until_appears()
except AssertionError as err:
if attempt:
self._open_add_account_popup(attempt-1)
else:
raise err
def delete_account(self, account_name: str, attempt: int = 2) -> RemoveWalletAccountPopup:
try:
@ -418,14 +425,18 @@ class StatusWalletScreen:
def verify_account_existence(self, name: str, color: str, emoji_unicode: str):
expected_account = constants.wallet.account_list_item(name, color.lower(), emoji_unicode)
started_at = time.monotonic()
while not expected_account in self.left_panel.accounts:
while expected_account not in self.left_panel.accounts:
time.sleep(1)
if time.monotonic() - started_at > 10:
if time.monotonic() - started_at > 15:
raise LookupError(f'Account {expected_account} not found in {self.left_panel.accounts}')
def verify_account_doesnt_exist(self, name: str):
assert name not in [account.name for account in self.left_panel.accounts], \
assert wait_for(name not in [account.name for account in self.left_panel.accounts], 10000), \
f'Account with {name} is still displayed even it should not be'
def verify_account_exist(self, name: str):
assert wait_for(name in [account.name for account in self.left_panel.accounts], 10000), \
f'Account with {name} is not displayed even it should be'
def verify_account_address_correct(self, account_name: str, address: str):
actual_address = self.left_panel.select_account(account_name).address

View File

@ -10,10 +10,16 @@ class AuthenticatePopup(BaseElement):
self._primary_button = Button('sharedPopup_Primary_Button')
self._cancel_buttom = Button('sharedPopup_Cancel_Button')
def authenticate(self, password: str = constants.user_account.PASSWORD):
def authenticate(self, password: str = constants.user_account.PASSWORD, attempt: int = 2):
self._password_text_edit.text = password
self._primary_button.click()
self._primary_button.wait_until_hidden()
try:
self._primary_button.wait_until_hidden()
except AssertionError as err:
if attempt:
self.authenticate(password, attempt-1)
else:
raise err
def cancel(self):
self._cancel_buttom.click()

View File

@ -175,7 +175,7 @@ class AccountPopup(BasePopup):
return self
def set_derivation_path(self, value: str, index: int):
self._edit_derivation_path_button.click()
self._edit_derivation_path_button.hover().click()
AuthenticatePopup().wait_until_appears().authenticate()
if value in [_.value for _ in constants.wallet.DerivationPath]:
self._derivation_path_combobox_button.click()

View File

@ -85,7 +85,7 @@ placeholder_StatusBaseText = {"container": statusDesktop_mainWindow_overlay, "id
o_StatusBackButton = {"container": statusDesktop_mainWindow_overlay, "type": "StatusBackButton", "unnamed": 1, "visible": True}
add_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "type": "StatusButton", "unnamed": 1, "visible": True}
linksView = {"container": statusDesktop_mainWindow, "id": "linksView", "type": "StatusListView", "unnamed": 1, "visible": True}
edit_TextEdit = {"container": statusDesktop_mainWindow_overlay, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
edit_TextEdit = {"container": statusDesktop_mainWindow_overlay, "type": "TextEdit", "unnamed": 1, "visible": True}
# Wallet Settings:
mainWallet_Saved_Addreses_More_Edit = {"container": statusDesktop_mainWindow, "objectName": "editroot", "type": "StatusMenuItem"}

View File

@ -89,7 +89,7 @@ addAccountPopup_OriginOption_StatusListItem = {"container": statusDesktop_mainWi
mainWallet_AddEditAccountPopup_OriginOptionWatchOnlyAcc = {"container": statusDesktop_mainWindow, "objectName": "AddAccountPopup-OriginOption-LABEL-OPTION-ADD-WATCH-ONLY-ACC", "type": "StatusListItem", "visible": True}
mainWallet_AddEditAccountPopup_AccountWatchOnlyAddressComponent = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-WatchOnlyAddress", "type": "StatusInput", "visible": True}
mainWallet_AddEditAccountPopup_AccountWatchOnlyAddress = {"container": mainWallet_AddEditAccountPopup_AccountWatchOnlyAddressComponent, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_AccountWatchOnlyAddress = {"container": mainWallet_AddEditAccountPopup_AccountWatchOnlyAddressComponent, "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_EditDerivationPathButton = {"container": statusDesktop_mainWindow, "objectName": "AddAccountPopup-EditDerivationPath", "type": "StatusButton", "visible": True}
mainWallet_AddEditAccountPopup_ResetDerivationPathButton = {"container": statusDesktop_mainWindow, "objectName": "AddAccountPopup-ResetDerivationPath", "type": "StatusLinkText", "enabled": True, "visible": True}
mainWallet_AddEditAccountPopup_DerivationPathInputComponent = {"container": statusDesktop_mainWindow, "objectName": "AddAccountPopup-DerivationPathInput", "type": "DerivationPathInput", "visible": True}
@ -107,11 +107,11 @@ mainWallet_AddEditAccountPopup_MasterKey_GenerateSeedPhraseOption = {"container"
mainWallet_AddEditAccountPopup_MasterKey_GoToKeycardSettingsOption = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-GoToKeycardSettings", "type": "StatusButton", "visible": True}
mainWallet_AddEditAccountPopup_PrivateKey = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-PrivateKeyInput", "type": "StatusPasswordInput", "visible": True}
mainWallet_AddEditAccountPopup_PrivateKeyNameComponent = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-PrivateKeyName", "type": "StatusInput", "visible": True}
mainWallet_AddEditAccountPopup_PrivateKeyName = {"container": mainWallet_AddEditAccountPopup_PrivateKeyNameComponent, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_PrivateKeyName = {"container": mainWallet_AddEditAccountPopup_PrivateKeyNameComponent, "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_ImportedSeedPhraseKeyNameComponent = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-ImportedSeedPhraseKeyName", "type": "StatusInput", "visible": True}
mainWallet_AddEditAccountPopup_ImportedSeedPhraseKeyName = {"container": mainWallet_AddEditAccountPopup_ImportedSeedPhraseKeyNameComponent, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_ImportedSeedPhraseKeyName = {"container": mainWallet_AddEditAccountPopup_ImportedSeedPhraseKeyNameComponent, "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_GeneratedSeedPhraseKeyNameComponent = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-GeneratedSeedPhraseKeyName", "type": "StatusInput", "visible": True}
mainWallet_AddEditAccountPopup_GeneratedSeedPhraseKeyName = {"container": mainWallet_AddEditAccountPopup_GeneratedSeedPhraseKeyNameComponent, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_GeneratedSeedPhraseKeyName = {"container": mainWallet_AddEditAccountPopup_GeneratedSeedPhraseKeyNameComponent, "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_HavePenAndPaperCheckBox = {"checkable": True, "container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-HavePenAndPaper", "type": "StatusCheckBox", "visible": True}
mainWallet_AddEditAccountPopup_SeedPhraseWrittenCheckBox = {"checkable": True, "container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-SeedPhraseWritten", "type": "StatusCheckBox", "visible": True}
mainWallet_AddEditAccountPopup_StoringSeedPhraseConfirmedCheckBox = {"checkable": True, "container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-StoringSeedPhraseConfirmed", "type": "StatusCheckBox", "visible": True}
@ -119,7 +119,7 @@ mainWallet_AddEditAccountPopup_SeedBackupAknowledgeCheckBox = {"checkable": True
mainWallet_AddEditAccountPopup_RevealSeedPhraseButton = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-RevealSeedPhrase", "type": "StatusButton", "visible": True}
mainWallet_AddEditAccountPopup_SeedPhraseWordAtIndex_Placeholder = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "SeedPhraseWordAtIndex-%WORD-INDEX%", "type": "StatusSeedPhraseInput", "visible": True}
mainWallet_AddEditAccountPopup_EnterSeedPhraseWordComponent = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "AddAccountPopup-EnterSeedPhraseWord", "type": "StatusInput", "visible": True}
mainWallet_AddEditAccountPopup_EnterSeedPhraseWord = {"container": mainWallet_AddEditAccountPopup_EnterSeedPhraseWordComponent, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_AddEditAccountPopup_EnterSeedPhraseWord = {"container": mainWallet_AddEditAccountPopup_EnterSeedPhraseWordComponent, "type": "TextEdit", "unnamed": 1, "visible": True}
confirmSeedPhrasePanel_StatusSeedPhraseInput = {"container": statusDesktop_mainWindow, "type": "StatusSeedPhraseInput", "visible": True}
mainWallet_AddEditAccountPopup_SPWord = {"container": mainWallet_AddEditAccountPopup_Content, "type": "TextEdit", "objectName": RegularExpression("statusSeedPhraseInputField*")}
mainWallet_AddEditAccountPopup_12WordsButton = {"container": mainWallet_AddEditAccountPopup_Content, "objectName": "12SeedButton", "type": "StatusSwitchTabButton"}
@ -153,7 +153,7 @@ mainWallet_AddEditAccountPopup_SPWord_24 = {"container": mainWallet_AddEditAccou
# Remove account popup:
mainWallet_Remove_Account_Popup_Account_Notification = {"container": statusDesktop_mainWindow, "objectName": "RemoveAccountPopup-Notification", "type": "StatusBaseText", "visible": True}
mainWallet_Remove_Account_Popup_Account_Path_Component = {"container": statusDesktop_mainWindow, "objectName": "RemoveAccountPopup-DerivationPath", "type": "StatusInput", "visible": True}
mainWallet_Remove_Account_Popup_Account_Path = {"container": mainWallet_Remove_Account_Popup_Account_Path_Component, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_Remove_Account_Popup_Account_Path = {"container": mainWallet_Remove_Account_Popup_Account_Path_Component, "type": "TextEdit", "unnamed": 1, "visible": True}
mainWallet_Remove_Account_Popup_HavePenPaperCheckBox = {"checkable": True, "container": statusDesktop_mainWindow, "objectName": "RemoveAccountPopup-HavePenPaper", "type": "StatusCheckBox", "visible": True}
mainWallet_Remove_Account_Popup_ConfirmButton = {"container": statusDesktop_mainWindow, "objectName": "RemoveAccountPopup-ConfirmButton", "type": "StatusButton", "visible": True}
mainWallet_Remove_Account_Popup_CancelButton = {"container": statusDesktop_mainWindow, "objectName": "RemoveAccountPopup-CancelButton", "type": "StatusFlatButton", "visible": True}

View File

@ -17,8 +17,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -17,8 +17,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -68,6 +68,7 @@ Feature: Status Desktop community messages
| message | reply |
| Community chat message | This is a reply |
@mayfail
Scenario Outline: The user can edit a message
Given the user sends a chat message "Edit me"
# Checking that message can be edited several times
@ -87,6 +88,7 @@ Feature: Status Desktop community messages
| message |
| random chat message |
@mayfail
Scenario: The user can clear chat history
Given the user sends a chat message "Hi hi"
And the user sends a chat message "testing chat"

View File

@ -17,8 +17,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -34,8 +34,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -18,8 +18,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -17,8 +17,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -14,7 +14,7 @@ def hook(context):
@OnScenarioEnd
def hook(context):
[ctx.detach() for ctx in squish.applicationContextList()]
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -74,12 +74,11 @@ def step(context, private_key, name, color, emoji):
@verify_screenshot
def step(context, seed_phrase, name, color, emoji):
account_popup = _walletScreen.left_panel.open_add_account_popup()
account_popup \
.set_name(name) \
.set_emoji(emoji) \
.set_color(color) \
.set_origin_seed_phrase(seed_phrase.split()) \
.save()
account_popup.set_name(name)
account_popup.set_emoji(emoji)
account_popup.set_color(color)
account_popup.set_origin_seed_phrase(seed_phrase.split())
account_popup.save()
AuthenticatePopup().wait_until_appears().authenticate()
account_popup.wait_until_hidden()
@ -88,36 +87,33 @@ def step(context, seed_phrase, name, color, emoji):
@verify_screenshot
def step(context, name, color, emoji, derivation_path, generated_address_index):
account_popup = _walletScreen.left_panel.open_add_account_popup()
account_popup \
.set_name(name) \
.set_emoji(emoji) \
.set_color(color) \
.set_derivation_path(derivation_path, generated_address_index) \
.save()
account_popup.set_name(name)
account_popup.set_emoji(emoji)
account_popup.set_color(color)
account_popup.set_derivation_path(derivation_path, generated_address_index)
account_popup.save()
@When("the user adds to \"|any|\" a custom generated account with \"|any|\" color \"|any|\" emoji \"|any|\" and derivation \"|any|\" \"|any|\"")
@verify_screenshot
def step(context, keypair_name, name, color, emoji, derivation_path, generated_address_index):
account_popup = _walletScreen.left_panel.open_add_account_popup()
account_popup \
.set_name(name) \
.set_emoji(emoji) \
.set_color(color) \
.set_derivation_path(derivation_path, generated_address_index) \
.set_origin_keypair(keypair_name) \
.save()
account_popup.set_name(name)
account_popup.set_emoji(emoji)
account_popup.set_color(color)
account_popup.set_derivation_path(derivation_path, generated_address_index)
account_popup.set_origin_keypair(keypair_name)
account_popup.save()
@When(
"the user adds a generated seed phrase account with \"|any|\" color \"|any|\" emoji \"|any|\" and keypair \"|any|\"")
def step(context, name, color, emoji, keypair_name):
account_popup = _walletScreen.left_panel.open_add_account_popup()
account_popup \
.set_name(name) \
.set_emoji(emoji) \
.set_color(color) \
.set_origin_new_seed_phrase(keypair_name) \
.save()
account_popup.set_name(name)
account_popup.set_emoji(emoji)
account_popup.set_color(color)
account_popup.set_origin_new_seed_phrase(keypair_name)
account_popup.save()
AuthenticatePopup().wait_until_appears().authenticate()
account_popup.wait_until_hidden()
@ -131,7 +127,10 @@ def step(context):
@When("the user edits an account with \"|any|\" to \"|any|\" with color \"|any|\" and emoji \"|any|\"")
def step(context, name, new_name, new_color, new_emoji):
account_popup = _walletScreen.left_panel.open_edit_account_popup(name)
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
account_popup.set_name(new_name)
account_popup.set_emoji(new_emoji)
account_popup.set_color(new_color)
account_popup.save()
@When("the user removes account \"|any|\"")
@ -190,15 +189,22 @@ def step(context, network_name):
def step(context, name, color, emoji_unicode):
_walletScreen.verify_account_existence(name, color, emoji_unicode)
@Then("settings keycard section is opened")
def step(context):
_walletScreen.verify_keycard_settings_is_opened()
@Then("the account with \"|any|\" is not displayed")
def step(context, name):
_walletScreen.verify_account_doesnt_exist(name)
@Then("the account with \"|any|\" is displayed")
def step(context, name):
_walletScreen.verify_account_exist(name)
@Then("the user has a positive balance of \"|any|\"")
def step(context, symbol):
_walletScreen.verify_positive_balance(symbol)

View File

@ -21,8 +21,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd
def hook(context):

View File

@ -22,8 +22,7 @@ def hook(context):
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
init_steps.driver.detach()
@OnStepEnd

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# This file contains hook functions to run as the .feature file is executed
import time
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
@ -17,12 +18,6 @@ def hook(context):
init_steps.context_init(context, testSettings)
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]
@ -35,4 +30,5 @@ def hook(context):
@OnScenarioEnd
def hook(context):
[ctx.detach() for ctx in squish.applicationContextList()]
init_steps.driver.detach()

View File

@ -62,7 +62,6 @@ Feature: Status Desktop Wallet Section Wallet Account Management
| name | color | emoji | emoji_unicode | add_via_context_menu |
| GenAcc1 | 2946C4 | sunglasses | 1f60e | yes |
@mayfail
Scenario Outline: The user manages a custom generated account
When the user adds a custom generated account with "<name>" color "#<color>" emoji "<emoji>" and derivation "<path>" "<address_index>"
Then the account is correctly displayed with "<name>" and "#<color>" and emoji unicode "<emoji_unicode>" in accounts list
@ -90,7 +89,6 @@ Feature: Status Desktop Wallet Section Wallet Account Management
| private_key | name | color | emoji | emoji_unicode | new_name | new_color | new_emoji | new_emoji_unicode |
| 2daa36a3abe381a9c01610bf10fda272fbc1b8a22179a39f782c512346e3e470 | PrivKeyAcc1 | 2946C4 | sunglasses | 1f60e | PrivKeyAcc1edited | 7CDA00 | thumbsup | 1f44d |
@mayfail
Scenario Outline: The user manages a seed phrase imported account
When the user adds an imported seed phrase account "<seed_phrase>" with "<name>" color "#<color>" and emoji "<emoji>"
Then the account is correctly displayed with "<name>" and "#<color>" and emoji unicode "<emoji_unicode>" in accounts list
@ -105,10 +103,10 @@ Feature: Status Desktop Wallet Section Wallet Account Management
| kitten tiny cup admit cactus shrug shuffle accident century faith roof plastic beach police barely vacant sign blossom | SPAcc18 | 2946C4 | sunglasses | 1f60e | SPAcc18edited | 7CDA00 | thumbsup | 1f44d |
| pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial | SPAcc12 | 2946C4 | sunglasses | 1f60e | SPAcc12edited | 7CDA00 | thumbsup | 1f44d |
@mayfail
Scenario Outline: The user manages an account created from the imported seed phrase
When the user adds an imported seed phrase account "pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial" with "SPAcc12" color "#2946C4" and emoji "sunglasses"
And the user adds to "pcsomrselw" a custom generated account with "<name>" color "#<color>" emoji "<emoji>" and derivation "<path>" "<address_index>"
Then the account with "SPAcc12" is displayed
When the user adds to "pcsomrselw" a custom generated account with "<name>" color "#<color>" emoji "<emoji>" and derivation "<path>" "<address_index>"
And the user removes account "<name>" with agreement
Then the account with "<name>" is not displayed
@ -133,7 +131,8 @@ Feature: Status Desktop Wallet Section Wallet Account Management
Scenario Outline: The user manages an account created from the generated seed phrase
When the user adds a generated seed phrase account with "SPKeyPair" color "#<color>" emoji "<emoji>" and keypair "<keypair_name>"
And the user adds to "<keypair_name>" a custom generated account with "<name>" color "#<color>" emoji "<emoji>" and derivation "<path>" "<address_index>"
Then the account with "SPKeyPair" is displayed
When the user adds to "<keypair_name>" a custom generated account with "<name>" color "#<color>" emoji "<emoji>" and derivation "<path>" "<address_index>"
Then the account is correctly displayed with "<name>" and "#<color>" and emoji unicode "<emoji_unicode>" in accounts list
When the user removes account "<name>" with agreement
Then the account with "<name>" is not displayed