chore: remove duplicated authentication popup
This commit is contained in:
parent
1cfcb2e537
commit
494a5b754d
|
@ -12,14 +12,15 @@ class AuthenticatePopup(BasePopup):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._content = QObject(names.keycardSharedPopupContent_KeycardPopupContent)
|
self._authenticate_popup_content = QObject(names.keycardSharedPopupContent_KeycardPopupContent)
|
||||||
self._password_text_edit = TextEdit(names.password_PlaceholderText)
|
self._password_text_edit = TextEdit(names.sharedPopup_Password_Input)
|
||||||
self._authenticate_button = Button(names.authenticate_StatusButton)
|
self._authenticate_button = Button(names.authenticate_StatusButton)
|
||||||
|
self._primary_button = Button(names.sharedPopup_Primary_Button)
|
||||||
self._close_button = Button(names.headerCloseButton_StatusFlatRoundButton)
|
self._close_button = Button(names.headerCloseButton_StatusFlatRoundButton)
|
||||||
|
|
||||||
@allure.step('Wait until appears {0}')
|
@allure.step('Wait until appears {0}')
|
||||||
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
||||||
self._content.wait_until_appears(timeout_msec)
|
self._authenticate_popup_content.wait_until_appears(timeout_msec)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Authenticate actions with password {0}')
|
@allure.step('Authenticate actions with password {0}')
|
||||||
|
@ -28,6 +29,11 @@ class AuthenticatePopup(BasePopup):
|
||||||
self._authenticate_button.click()
|
self._authenticate_button.click()
|
||||||
self._authenticate_button.wait_until_hidden(10000)
|
self._authenticate_button.wait_until_hidden(10000)
|
||||||
|
|
||||||
|
@allure.step('Check if authenticate button is present')
|
||||||
|
def is_authenticate_button_visible(self):
|
||||||
|
return self._primary_button.is_visible
|
||||||
|
|
||||||
@allure.step('Close authenticate popup by close button')
|
@allure.step('Close authenticate popup by close button')
|
||||||
def close_authenticate_popup(self):
|
def close_authenticate_popup(self):
|
||||||
self._close_button.click()
|
self._close_button.click()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
from gui.components.base_popup import BasePopup
|
from gui.components.base_popup import BasePopup
|
||||||
from gui.components.community.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.object import QObject
|
from gui.elements.object import QObject
|
||||||
from gui.elements.text_label import TextLabel
|
from gui.elements.text_label import TextLabel
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
import configs
|
import configs
|
||||||
from gui.components.community.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.object import QObject
|
from gui.elements.object import QObject
|
||||||
from gui.objects_map import names
|
from gui.objects_map import names
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
import allure
|
|
||||||
|
|
||||||
from gui.elements.button import Button
|
|
||||||
from gui.elements.object import QObject
|
|
||||||
from gui.elements.text_edit import TextEdit
|
|
||||||
from gui.objects_map import names
|
|
||||||
|
|
||||||
|
|
||||||
class AuthenticatePopup(QObject):
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
super(AuthenticatePopup, self).__init__(names.contextMenu_PopupItem)
|
|
||||||
self._password_text_edit = TextEdit(names.sharedPopup_Password_Input)
|
|
||||||
self._primary_button = Button(names.sharedPopup_Primary_Button)
|
|
||||||
|
|
||||||
@allure.step('Authenticate action with password')
|
|
||||||
def authenticate(self, password: str, attempt: int = 2):
|
|
||||||
self._password_text_edit.text = password
|
|
||||||
self._primary_button.click()
|
|
||||||
try:
|
|
||||||
self._primary_button.wait_until_hidden()
|
|
||||||
except AssertionError as err:
|
|
||||||
if attempt:
|
|
||||||
self.authenticate(password, attempt - 1)
|
|
||||||
else:
|
|
||||||
raise err
|
|
||||||
|
|
||||||
@allure.step('Check if authenticate button is present')
|
|
||||||
def is_authenticate_button_visible(self):
|
|
||||||
return self._primary_button.is_visible
|
|
||||||
|
|
|
@ -1,16 +1,10 @@
|
||||||
import random
|
import random
|
||||||
import typing
|
|
||||||
|
|
||||||
import allure
|
|
||||||
|
|
||||||
import configs
|
|
||||||
from constants.wallet import *
|
from constants.wallet import *
|
||||||
import driver
|
|
||||||
from gui.objects_map import names
|
|
||||||
from gui.screens.settings_wallet import *
|
from gui.screens.settings_wallet import *
|
||||||
from gui.components.base_popup import BasePopup
|
from gui.components.base_popup import BasePopup
|
||||||
from gui.components.emoji_popup import EmojiPopup
|
from gui.components.emoji_popup import EmojiPopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.wallet.back_up_your_seed_phrase_popup import BackUpYourSeedPhrasePopUp
|
from gui.components.wallet.back_up_your_seed_phrase_popup import BackUpYourSeedPhrasePopUp
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.check_box import CheckBox
|
from gui.elements.check_box import CheckBox
|
||||||
|
@ -18,6 +12,7 @@ from gui.elements.object import QObject
|
||||||
from gui.elements.scroll import Scroll
|
from gui.elements.scroll import Scroll
|
||||||
from gui.elements.text_edit import TextEdit
|
from gui.elements.text_edit import TextEdit
|
||||||
from gui.elements.text_label import TextLabel
|
from gui.elements.text_label import TextLabel
|
||||||
|
from gui.objects_map import names
|
||||||
|
|
||||||
GENERATED_PAGES_LIMIT = 20
|
GENERATED_PAGES_LIMIT = 20
|
||||||
|
|
||||||
|
@ -39,7 +34,7 @@ class AccountPopup(BasePopup):
|
||||||
self._use_keycard_button = QObject(names.mainWallet_AddEditAccountPopup_MasterKey_GoToKeycardSettingsOption)
|
self._use_keycard_button = QObject(names.mainWallet_AddEditAccountPopup_MasterKey_GoToKeycardSettingsOption)
|
||||||
# derivation
|
# derivation
|
||||||
self._address_text_edit = TextEdit(names.mainWallet_AddEditAccountPopup_AccountWatchOnlyAddress)
|
self._address_text_edit = TextEdit(names.mainWallet_AddEditAccountPopup_AccountWatchOnlyAddress)
|
||||||
self._add_account_button = Button(names.mainWallet_AddEditAccountPopup_PrimaryButton)
|
self._add_save_account_confirmation_button = Button(names.mainWallet_AddEditAccountPopup_PrimaryButton)
|
||||||
self._edit_derivation_path_button = Button(names.mainWallet_AddEditAccountPopup_EditDerivationPathButton)
|
self._edit_derivation_path_button = Button(names.mainWallet_AddEditAccountPopup_EditDerivationPathButton)
|
||||||
self._derivation_path_combobox_button = Button(
|
self._derivation_path_combobox_button = Button(
|
||||||
names.mainWallet_AddEditAccountPopup_PreDefinedDerivationPathsButton)
|
names.mainWallet_AddEditAccountPopup_PreDefinedDerivationPathsButton)
|
||||||
|
@ -162,9 +157,9 @@ class AccountPopup(BasePopup):
|
||||||
self._use_keycard_button.click()
|
self._use_keycard_button.click()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Save added account')
|
@allure.step('Click confirmation (add account / save changes) button')
|
||||||
def save(self):
|
def save_changes(self):
|
||||||
self._add_account_button.wait_until_appears().click()
|
self._add_save_account_confirmation_button.click()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ confirm_delete_message_StatusButton = {"checkable": False, "container": statusDe
|
||||||
# Authenticate Popup
|
# Authenticate Popup
|
||||||
keycardSharedPopupContent_KeycardPopupContent = {"container": statusDesktop_mainWindow_overlay, "objectName": "KeycardSharedPopupContent", "type": "KeycardPopupContent", "visible": True}
|
keycardSharedPopupContent_KeycardPopupContent = {"container": statusDesktop_mainWindow_overlay, "objectName": "KeycardSharedPopupContent", "type": "KeycardPopupContent", "visible": True}
|
||||||
password_PlaceholderText = {"container": statusDesktop_mainWindow_overlay, "type": "PlaceholderText", "unnamed": 1, "visible": True}
|
password_PlaceholderText = {"container": statusDesktop_mainWindow_overlay, "type": "PlaceholderText", "unnamed": 1, "visible": True}
|
||||||
authenticate_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "PrimaryButton", "text": "Authenticate", "type": "StatusButton", "visible": True}
|
authenticate_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "PrimaryButton", "type": "StatusButton", "visible": True}
|
||||||
headerCloseButton_StatusFlatRoundButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerCloseButton", "type": "StatusFlatRoundButton", "visible": True}
|
headerCloseButton_StatusFlatRoundButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerCloseButton", "type": "StatusFlatRoundButton", "visible": True}
|
||||||
|
|
||||||
# Shared Popup
|
# Shared Popup
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
from constants.syncing import SyncingSettings
|
from constants.syncing import SyncingSettings
|
||||||
from gui.components.community.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.settings.sync_new_device_popup import SyncNewDevicePopup
|
from gui.components.settings.sync_new_device_popup import SyncNewDevicePopup
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.object import QObject
|
from gui.elements.object import QObject
|
||||||
|
|
|
@ -9,11 +9,11 @@ from . import marks
|
||||||
import configs
|
import configs
|
||||||
import constants
|
import constants
|
||||||
import driver
|
import driver
|
||||||
from constants import ColorCodes, aut_options
|
from constants import ColorCodes
|
||||||
from constants.images_paths import PLUG_IN_KEYCARD_IMAGE_PATH, INSERT_KEYCARD_IMAGE_PATH, CHOOSE_KEYCARD_PIN_IMAGE_PATH, \
|
from constants.images_paths import PLUG_IN_KEYCARD_IMAGE_PATH, CHOOSE_KEYCARD_PIN_IMAGE_PATH, \
|
||||||
KEYCARD_SUCCESS_IMAGE_PATH
|
KEYCARD_SUCCESS_IMAGE_PATH
|
||||||
from constants.keycard import Keycard
|
from constants.keycard import Keycard
|
||||||
from gui.components.community.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
from gui.mocked_keycard_controller import MockedKeycardController
|
from gui.mocked_keycard_controller import MockedKeycardController
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import pytest
|
||||||
from allure_commons._allure import step
|
from allure_commons._allure import step
|
||||||
|
|
||||||
from constants.wallet import WalletRenameKeypair
|
from constants.wallet import WalletRenameKeypair
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from tests.wallet_main_screen import marks
|
from tests.wallet_main_screen import marks
|
||||||
|
|
||||||
import constants
|
import constants
|
||||||
|
@ -33,21 +33,21 @@ def test_rename_keypair_test(main_screen: MainWindow, user_account, name: str, c
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).save()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Create imported seed phrase wallet account'):
|
with step('Create imported seed phrase wallet account'):
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(second_name).set_emoji(emoji).set_color(color).set_origin_seed_phrase(
|
account_popup.set_name(second_name).set_emoji(emoji).set_color(color).set_origin_seed_phrase(
|
||||||
seed_phrase.split()).save()
|
seed_phrase.split()).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Import an account within private key'):
|
with step('Import an account within private key'):
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(third_name).set_emoji(emoji).set_color(color).set_origin_private_key(
|
account_popup.set_name(third_name).set_emoji(emoji).set_color(color).set_origin_private_key(
|
||||||
address_pair.private_key).save()
|
address_pair.private_key).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
|
@ -2,14 +2,13 @@ import allure
|
||||||
import pytest
|
import pytest
|
||||||
from allure_commons._allure import step
|
from allure_commons._allure import step
|
||||||
|
|
||||||
import constants
|
|
||||||
from constants import EmojiCodes
|
from constants import EmojiCodes
|
||||||
from . import marks
|
from . import marks
|
||||||
|
|
||||||
import configs
|
import configs
|
||||||
import driver
|
import driver
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -34,7 +33,7 @@ def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_acc
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_watched_address(address)
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_watched_address(address)
|
||||||
assert account_popup.get_emoji_from_account_title() == EmojiCodes.SMILING_FACE_WITH_SUNGLASSES.value, \
|
assert account_popup.get_emoji_from_account_title() == EmojiCodes.SMILING_FACE_WITH_SUNGLASSES.value, \
|
||||||
f'Emoji was not set or does not match'
|
f'Emoji was not set or does not match'
|
||||||
account_popup.save()
|
account_popup.save_changes()
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Create generated wallet account'):
|
with step('Create generated wallet account'):
|
||||||
|
@ -42,7 +41,7 @@ def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_acc
|
||||||
account_popup.set_name(second_name).set_emoji(second_emoji).set_color(second_color)
|
account_popup.set_name(second_name).set_emoji(second_emoji).set_color(second_color)
|
||||||
assert account_popup.get_emoji_from_account_title() == EmojiCodes.THUMBSUP_SIGN.value, \
|
assert account_popup.get_emoji_from_account_title() == EmojiCodes.THUMBSUP_SIGN.value, \
|
||||||
f'Emoji was not set or does not match'
|
f'Emoji was not set or does not match'
|
||||||
account_popup.save()
|
account_popup.save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import constants
|
||||||
import driver
|
import driver
|
||||||
from constants.wallet import WalletAccountSettings, DerivationPath
|
from constants.wallet import WalletAccountSettings, DerivationPath
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
from gui.screens.settings_wallet import WalletSettingsView
|
from gui.screens.settings_wallet import WalletSettingsView
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ def test_delete_generated_account_from_wallet_settings(
|
||||||
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
||||||
|
|
||||||
with step('Add a new generated account from wallet settings screen'):
|
with step('Add a new generated account from wallet settings screen'):
|
||||||
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save()
|
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
add_account_popup.wait_until_hidden()
|
add_account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from . import marks
|
||||||
|
|
||||||
import constants
|
import constants
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -32,7 +32,7 @@ def test_add_new_account_from_wallet_settings(
|
||||||
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
||||||
|
|
||||||
with step('Add a new generated account from wallet settings screen'):
|
with step('Add a new generated account from wallet settings screen'):
|
||||||
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save()
|
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
add_account_popup.wait_until_hidden()
|
add_account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ def test_settings_include_in_total_balance(main_screen: MainWindow, name, watche
|
||||||
with step('Open wallet settings screen and add watched address using "+" button'):
|
with step('Open wallet settings screen and add watched address using "+" button'):
|
||||||
add_account_popup = \
|
add_account_popup = \
|
||||||
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_add_account_pop_up()
|
||||||
add_account_popup.set_name(name).set_origin_watched_address(watched_address).save()
|
add_account_popup.set_name(name).set_origin_watched_address(watched_address).save_changes()
|
||||||
add_account_popup.wait_until_hidden()
|
add_account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Open wallet settings and verify the keypair for the watched address is present with default title'):
|
with step('Open wallet settings and verify the keypair for the watched address is present with default title'):
|
||||||
|
|
|
@ -11,12 +11,14 @@ from . import marks
|
||||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||||
from gui.components.splash_screen import SplashScreen
|
from gui.components.splash_screen import SplashScreen
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.wallet.send_popup import SendPopup
|
from gui.components.wallet.send_popup import SendPopup
|
||||||
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
||||||
from gui.screens.settings_ens_usernames import ENSRegisteredView
|
from gui.screens.settings_ens_usernames import ENSRegisteredView
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def keys_screen(main_window) -> KeysView:
|
def keys_screen(main_window) -> KeysView:
|
||||||
with step('Open Generate new keys view'):
|
with step('Open Generate new keys view'):
|
||||||
|
|
|
@ -39,7 +39,7 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_origin_watched_address(address).save()
|
account_popup.set_name(name).set_origin_watched_address(address).save_changes()
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step(
|
with step(
|
||||||
|
@ -157,7 +157,7 @@ def test_custom_ordering(main_screen: MainWindow, address, name, dai, weenus, st
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_origin_watched_address(address).save()
|
account_popup.set_name(name).set_origin_watched_address(address).save_changes()
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step(
|
with step(
|
||||||
|
|
|
@ -10,7 +10,7 @@ from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.splash_screen import SplashScreen
|
from gui.components.splash_screen import SplashScreen
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.splash_screen import SplashScreen
|
from gui.components.splash_screen import SplashScreen
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
from gui.screens.onboarding import KeysView, WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@ from tests.wallet_main_screen import marks
|
||||||
import constants
|
import constants
|
||||||
from driver.aut import AUT
|
from driver.aut import AUT
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -37,7 +36,7 @@ def test_add_generated_account_restart_add_again(
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).save()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
@ -64,7 +63,7 @@ def test_add_generated_account_restart_add_again(
|
||||||
assert not SigningPhrasePopup().is_ok_got_it_button_visible(), \
|
assert not SigningPhrasePopup().is_ok_got_it_button_visible(), \
|
||||||
f"Signing phrase should not be present because it has been hidden in the first step"
|
f"Signing phrase should not be present because it has been hidden in the first step"
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name2).set_emoji(emoji2).set_color(color2).save()
|
account_popup.set_name(name2).set_emoji(emoji2).set_color(color2).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ from tests.wallet_main_screen import marks
|
||||||
|
|
||||||
import constants
|
import constants
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -27,7 +26,7 @@ def test_plus_button_add_watched_address(
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_watched_address(address).save()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_watched_address(address).save_changes()
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Check authentication popup does not appear'):
|
with step('Check authentication popup does not appear'):
|
||||||
|
|
|
@ -8,8 +8,7 @@ from tests.wallet_main_screen import marks
|
||||||
import constants
|
import constants
|
||||||
import driver
|
import driver
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -33,7 +32,7 @@ def test_plus_button_manage_account_added_for_new_seed(main_screen: MainWindow,
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.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).set_emoji(emoji).set_color(color).set_origin_new_seed_phrase(keypair_name).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ def test_plus_button_manage_account_added_for_new_seed(main_screen: MainWindow,
|
||||||
|
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -8,8 +8,7 @@ from tests.wallet_main_screen import marks
|
||||||
import constants
|
import constants
|
||||||
import driver
|
import driver
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -33,7 +32,7 @@ def test_plus_button_manage_account_from_private_key(main_screen: MainWindow, us
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_private_key(
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_private_key(
|
||||||
address_pair.private_key).save()
|
address_pair.private_key).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
@ -63,7 +62,7 @@ def test_plus_button_manage_account_from_private_key(main_screen: MainWindow, us
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
main_screen.left_panel.open_wallet()
|
main_screen.left_panel.open_wallet()
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -10,8 +10,7 @@ from tests.wallet_main_screen import marks
|
||||||
import constants
|
import constants
|
||||||
import driver
|
import driver
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -44,7 +43,7 @@ def test_plus_button_manage_account_from_seed_phrase(main_screen: MainWindow, us
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_seed_phrase(
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_origin_seed_phrase(
|
||||||
seed_phrase.split()).save()
|
seed_phrase.split()).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
@ -64,7 +63,7 @@ def test_plus_button_manage_account_from_seed_phrase(main_screen: MainWindow, us
|
||||||
|
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -8,8 +8,7 @@ from tests.wallet_main_screen import marks
|
||||||
import constants
|
import constants
|
||||||
import driver
|
import driver
|
||||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||||
from gui.components.toast_message import ToastMessage
|
from gui.components.authenticate_popup import AuthenticatePopup
|
||||||
from gui.components.wallet.authenticate_popup import AuthenticatePopup
|
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
pytestmark = marks
|
pytestmark = marks
|
||||||
|
@ -31,7 +30,7 @@ def test_plus_button_manage_generated_account(main_screen: MainWindow, user_acco
|
||||||
wallet = main_screen.left_panel.open_wallet()
|
wallet = main_screen.left_panel.open_wallet()
|
||||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).save()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
AuthenticatePopup().wait_until_appears().authenticate(user_account.password)
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
|
@ -51,7 +50,7 @@ def test_plus_button_manage_generated_account(main_screen: MainWindow, user_acco
|
||||||
|
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -36,7 +36,7 @@ def test_plus_button_manage_generated_account_custom_derivation_path(main_screen
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_derivation_path(derivation_path,
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_derivation_path(derivation_path,
|
||||||
generated_address_index,
|
generated_address_index,
|
||||||
user_account.password).save()
|
user_account.password).save_changes()
|
||||||
|
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
|
@ -55,7 +55,7 @@ def test_plus_button_manage_generated_account_custom_derivation_path(main_screen
|
||||||
|
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -29,7 +29,7 @@ def test_context_menu_edit_default_account(main_screen: MainWindow, name: str, n
|
||||||
|
|
||||||
with step('Edit wallet account'):
|
with step('Edit wallet account'):
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
|
@ -32,7 +32,7 @@ def test_right_click_manage_watch_only_account_context_menu(main_screen: MainWin
|
||||||
|
|
||||||
with step('Create watched address from context menu'):
|
with step('Create watched address from context menu'):
|
||||||
account_popup = wallet.left_panel.select_add_watched_address_from_context_menu()
|
account_popup = wallet.left_panel.select_add_watched_address_from_context_menu()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_eth_address(address).save()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).set_eth_address(address).save_changes()
|
||||||
account_popup.wait_until_hidden()
|
account_popup.wait_until_hidden()
|
||||||
|
|
||||||
with step('Verify toast message notification when adding account'):
|
with step('Verify toast message notification when adding account'):
|
||||||
|
@ -45,7 +45,7 @@ def test_right_click_manage_watch_only_account_context_menu(main_screen: MainWin
|
||||||
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
account_popup = wallet.left_panel.open_edit_account_popup_from_context_menu(name)
|
||||||
|
|
||||||
with step('Set new name, emoji and color for account and save'):
|
with step('Set new name, emoji and color for account and save'):
|
||||||
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save()
|
account_popup.set_name(new_name).set_emoji(new_emoji).set_color(new_color).save_changes()
|
||||||
|
|
||||||
with step('Verify that the account is correctly displayed in accounts list'):
|
with step('Verify that the account is correctly displayed in accounts list'):
|
||||||
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
expected_account = constants.user.account_list_item(new_name, new_color.lower(), new_emoji_unicode)
|
||||||
|
|
Loading…
Reference in New Issue