Skip to content

Commit 6c128c1

Browse files
committed
temp disable tests which are using zpywallet lib
1 parent 7a586e1 commit 6c128c1

File tree

4 files changed

+176
-176
lines changed

4 files changed

+176
-176
lines changed

test/e2e/scripts/utils/generators.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import json
22
import random
33
import string
4-
from zpywallet import HDWallet
5-
from zpywallet.network import EthereumMainNet
6-
from eth_account.hdaccount import generate_mnemonic, Mnemonic
4+
# from zpywallet import HDWallet
5+
# from zpywallet.network import EthereumMainNet
6+
# from eth_account.hdaccount import generate_mnemonic, Mnemonic
77

88
import configs
99
from constants import user, WalletAccountColors
@@ -63,12 +63,12 @@ def random_color():
6363
return hex_color
6464

6565

66-
def random_mnemonic():
67-
words = ''
68-
while not Mnemonic().is_mnemonic_valid(mnemonic=words):
69-
new_words = generate_mnemonic(num_words=random.choice([12, 18, 24]), lang='english')
70-
words = new_words
71-
return words
66+
# def random_mnemonic():
67+
# words = ''
68+
# while not Mnemonic().is_mnemonic_valid(mnemonic=words):
69+
# new_words = generate_mnemonic(num_words=random.choice([12, 18, 24]), lang='english')
70+
# words = new_words
71+
# return words
7272

7373

7474
def random_wallet_acc_keypair_name():

test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,57 @@
77
from constants.wallet import WalletNetworkSettings
88
from driver.aut import AUT
99
from helpers.onboarding_helper import open_create_profile_view, import_seed_and_log_in
10-
from scripts.utils.generators import random_mnemonic, get_wallet_address_from_mnemonic
10+
#from scripts.utils.generators import random_mnemonic, get_wallet_address_from_mnemonic
1111

1212
from gui.main_window import MainLeftPanel, MainWindow
1313
from gui.screens.onboarding import ReturningLoginView
1414

1515

16-
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
17-
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736372', 'Re-importing seed-phrase')
18-
@pytest.mark.case(703040, 736372, 738726)
19-
@pytest.mark.critical
20-
@pytest.mark.smoke
21-
def test_import_and_reimport_random_seed(
22-
main_window: MainWindow,
23-
aut: AUT,
24-
user_account: UserAccount,
25-
seed_phrase=random_mnemonic()
26-
):
27-
with step('Import seed and log in'):
28-
29-
with step('Open Create your profile view'):
30-
create_your_profile_view = open_create_profile_view()
31-
with step('Import seed and log in'):
32-
import_seed_and_log_in(create_your_profile_view, seed_phrase, user_account)
33-
34-
with step('Verify that restored account reveals correct status wallet address'):
35-
profile = main_window.home.open_from_dock(DockButtons.SETTINGS.value).left_panel.open_profile_settings()
36-
profile.set_name(user_account.name)
37-
profile.save_changes_button.click()
38-
39-
status_account_index = 0
40-
status_acc_view = (
41-
MainLeftPanel().open_settings().left_panel.open_wallet_settings().open_account_in_settings(
42-
WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value,
43-
status_account_index))
44-
address = status_acc_view.get_account_address_value()
45-
46-
address_from_seed = get_wallet_address_from_mnemonic(seed_phrase)
47-
# assert Web3.is_checksum_address(address) todo: https://github.com/status-im/status-desktop/issues/17648
48-
assert address == address_from_seed, \
49-
f"Recovered account should have address {address_from_seed}, but has {address}"
50-
51-
with step('Verify that the user logged in via seed phrase correctly'):
52-
user_canvas = main_window.left_panel.open_online_identifier()
53-
profile_popup = user_canvas.open_profile_popup_from_online_identifier()
54-
assert profile_popup.user_name == user_account.name
55-
56-
with step('Restart application and try re-importing seed phrase again'):
57-
aut.restart()
58-
main_window.prepare()
59-
enter_seed_view = ReturningLoginView().add_existing_status_user().open_seed_phrase_view()
60-
enter_seed_view.fill_in_seed_phrase_grid(seed_phrase.split(), autocomplete=False)
61-
62-
with step('Verify that keys already exist popup appears and text is correct'):
63-
assert enter_seed_view.invalid_seed_text.text == 'The entered recovery phrase is already added'
16+
# @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
17+
# @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736372', 'Re-importing seed-phrase')
18+
# @pytest.mark.case(703040, 736372, 738726)
19+
# @pytest.mark.critical
20+
# @pytest.mark.smoke
21+
# def test_import_and_reimport_random_seed(
22+
# main_window: MainWindow,
23+
# aut: AUT,
24+
# user_account: UserAccount,
25+
# seed_phrase=random_mnemonic()
26+
# ):
27+
# with step('Import seed and log in'):
28+
#
29+
# with step('Open Create your profile view'):
30+
# create_your_profile_view = open_create_profile_view()
31+
# with step('Import seed and log in'):
32+
# import_seed_and_log_in(create_your_profile_view, seed_phrase, user_account)
33+
#
34+
# with step('Verify that restored account reveals correct status wallet address'):
35+
# profile = main_window.home.open_from_dock(DockButtons.SETTINGS.value).left_panel.open_profile_settings()
36+
# profile.set_name(user_account.name)
37+
# profile.save_changes_button.click()
38+
#
39+
# status_account_index = 0
40+
# status_acc_view = (
41+
# MainLeftPanel().open_settings().left_panel.open_wallet_settings().open_account_in_settings(
42+
# WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value,
43+
# status_account_index))
44+
# address = status_acc_view.get_account_address_value()
45+
#
46+
# address_from_seed = get_wallet_address_from_mnemonic(seed_phrase)
47+
# # assert Web3.is_checksum_address(address) todo: https://github.com/status-im/status-desktop/issues/17648
48+
# assert address == address_from_seed, \
49+
# f"Recovered account should have address {address_from_seed}, but has {address}"
50+
#
51+
# with step('Verify that the user logged in via seed phrase correctly'):
52+
# user_canvas = main_window.left_panel.open_online_identifier()
53+
# profile_popup = user_canvas.open_profile_popup_from_online_identifier()
54+
# assert profile_popup.user_name == user_account.name
55+
#
56+
# with step('Restart application and try re-importing seed phrase again'):
57+
# aut.restart()
58+
# main_window.prepare()
59+
# enter_seed_view = ReturningLoginView().add_existing_status_user().open_seed_phrase_view()
60+
# enter_seed_view.fill_in_seed_phrase_grid(seed_phrase.split(), autocomplete=False)
61+
#
62+
# with step('Verify that keys already exist popup appears and text is correct'):
63+
# assert enter_seed_view.invalid_seed_text.text == 'The entered recovery phrase is already added'

test/e2e/tests/settings/settings_keycard/test_import_restore_keycard_via_seed_phrase.py

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,62 @@
1414
from scripts.utils.generators import random_mnemonic
1515

1616

17-
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703625',
18-
'Import or restore a Keycard via a seed phrase')
19-
@pytest.mark.case(703625)
20-
@pytest.mark.keycard
21-
def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow):
22-
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
23-
pin = Keycard.KEYCARD_PIN.value
24-
keycard_name = Keycard.KEYCARD_NAME.value
25-
account_name = Keycard.ACCOUNT_NAME.value
26-
27-
with step('Choose option Import or restore account via seed phrase in settings'):
28-
main_screen.prepare()
29-
keycard_settings = main_screen.left_panel.open_settings().left_panel.open_keycard_settings()
30-
keycard_popup = keycard_settings.click_import_restore_via_seed_phrase()
31-
32-
with step('Verify that header, instructions and image path are correct'):
33-
actual_keycard_header = keycard_popup.keycard_header
34-
actual_instructions = keycard_popup.keycard_instructions
35-
actual_image_path = keycard_popup.keycard_image_source_path
36-
assert actual_keycard_header == Keycard.KEYCARD_POPUP_HEADER_IMPORT_SEED.value, f"The header is incorrect {actual_keycard_header}"
37-
assert Keycard.KEYCARD_INSTRUCTIONS_PLUG_IN.value in actual_instructions, f"There is no correct keycard instruction in {actual_instructions}"
38-
assert PLUG_IN_KEYCARD_IMAGE_PATH == actual_image_path
39-
40-
with step('Plug in reader'):
41-
main_screen.hide()
42-
keycard_controller = MockedKeycardController().wait_until_appears(10000)
43-
keycard_controller.plugin_reader()
44-
main_screen.show()
45-
46-
with step('Verify displayed keycard popup instructions and image path are correct'):
47-
assert driver.waitFor(
48-
lambda: Keycard.KEYCARD_INSTRUCTIONS_INSERT_KEYCARD.value in keycard_popup.keycard_instructions,
49-
timeout), "There is no correct keycard instruction"
50-
time.sleep(2)
51-
assert INSERT_KEYCARD_IMAGE_PATH == keycard_popup.keycard_image_source_path
52-
53-
with step('Register and insert keycard'):
54-
main_screen.hide()
55-
keycard_controller.register_keycard().insert_keycard_1()
56-
main_screen.show()
57-
58-
with step('Verify displayed keycard popup instructions are correct'):
59-
assert driver.waitFor(lambda: Keycard.KEYCARD_RECOGNIZED.value in keycard_popup.keycard_instructions,
60-
timeout), f"There is no correct keycard instruction in {keycard_popup.keycard_instructions}"
61-
62-
with step('Import keycard via seed phrase'):
63-
keycard_popup.import_keycard_via_seed_phrase(random_mnemonic().split(), pin, keycard_name, account_name)
64-
65-
with step('Verify that preview shows correct keycard and account name and color and instructions are correct'):
66-
assert driver.waitFor(lambda: Keycard.KEYCARD_READY.value in keycard_popup.keycard_instructions), \
67-
f"There is no correct keycard instruction in {keycard_popup.keycard_instructions}"
68-
69-
assert keycard_popup.keypair_name == keycard_name, "Keycard name in preview is incorrect"
70-
assert keycard_popup.keypair_account_name == account_name, "Account name in preview is incorrect"
71-
assert keycard_popup.keypair_account_color == ColorCodes.BLUE.value, "Color in preview is incorrect"
72-
73-
with step('Keycard image source path is correct'):
74-
time.sleep(2)
75-
assert KEYCARD_SUCCESS_IMAGE_PATH == keycard_popup.keycard_image_source_path
17+
# @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703625',
18+
# 'Import or restore a Keycard via a seed phrase')
19+
# @pytest.mark.case(703625)
20+
# @pytest.mark.keycard
21+
# def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow):
22+
# timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
23+
# pin = Keycard.KEYCARD_PIN.value
24+
# keycard_name = Keycard.KEYCARD_NAME.value
25+
# account_name = Keycard.ACCOUNT_NAME.value
26+
#
27+
# with step('Choose option Import or restore account via seed phrase in settings'):
28+
# main_screen.prepare()
29+
# keycard_settings = main_screen.left_panel.open_settings().left_panel.open_keycard_settings()
30+
# keycard_popup = keycard_settings.click_import_restore_via_seed_phrase()
31+
#
32+
# with step('Verify that header, instructions and image path are correct'):
33+
# actual_keycard_header = keycard_popup.keycard_header
34+
# actual_instructions = keycard_popup.keycard_instructions
35+
# actual_image_path = keycard_popup.keycard_image_source_path
36+
# assert actual_keycard_header == Keycard.KEYCARD_POPUP_HEADER_IMPORT_SEED.value, f"The header is incorrect {actual_keycard_header}"
37+
# assert Keycard.KEYCARD_INSTRUCTIONS_PLUG_IN.value in actual_instructions, f"There is no correct keycard instruction in {actual_instructions}"
38+
# assert PLUG_IN_KEYCARD_IMAGE_PATH == actual_image_path
39+
#
40+
# with step('Plug in reader'):
41+
# main_screen.hide()
42+
# keycard_controller = MockedKeycardController().wait_until_appears(10000)
43+
# keycard_controller.plugin_reader()
44+
# main_screen.show()
45+
#
46+
# with step('Verify displayed keycard popup instructions and image path are correct'):
47+
# assert driver.waitFor(
48+
# lambda: Keycard.KEYCARD_INSTRUCTIONS_INSERT_KEYCARD.value in keycard_popup.keycard_instructions,
49+
# timeout), "There is no correct keycard instruction"
50+
# time.sleep(2)
51+
# assert INSERT_KEYCARD_IMAGE_PATH == keycard_popup.keycard_image_source_path
52+
#
53+
# with step('Register and insert keycard'):
54+
# main_screen.hide()
55+
# keycard_controller.register_keycard().insert_keycard_1()
56+
# main_screen.show()
57+
#
58+
# with step('Verify displayed keycard popup instructions are correct'):
59+
# assert driver.waitFor(lambda: Keycard.KEYCARD_RECOGNIZED.value in keycard_popup.keycard_instructions,
60+
# timeout), f"There is no correct keycard instruction in {keycard_popup.keycard_instructions}"
61+
#
62+
# with step('Import keycard via seed phrase'):
63+
# keycard_popup.import_keycard_via_seed_phrase(random_mnemonic().split(), pin, keycard_name, account_name)
64+
#
65+
# with step('Verify that preview shows correct keycard and account name and color and instructions are correct'):
66+
# assert driver.waitFor(lambda: Keycard.KEYCARD_READY.value in keycard_popup.keycard_instructions), \
67+
# f"There is no correct keycard instruction in {keycard_popup.keycard_instructions}"
68+
#
69+
# assert keycard_popup.keypair_name == keycard_name, "Keycard name in preview is incorrect"
70+
# assert keycard_popup.keypair_account_name == account_name, "Account name in preview is incorrect"
71+
# assert keycard_popup.keypair_account_color == ColorCodes.BLUE.value, "Color in preview is incorrect"
72+
#
73+
# with step('Keycard image source path is correct'):
74+
# time.sleep(2)
75+
# assert KEYCARD_SUCCESS_IMAGE_PATH == keycard_popup.keycard_image_source_path

0 commit comments

Comments
 (0)