chore: keycard_tests fixes (#318)
This commit is contained in:
parent
e6c5443d3d
commit
867d9c7467
|
@ -5,6 +5,7 @@ class Keycard(Enum):
|
|||
KEYCARD_PIN = '111111'
|
||||
KEYCARD_INCORRECT_PIN = '222222'
|
||||
KEYCARD_NAME = 'Test Keycard'
|
||||
ACCOUNT_NAME = 'Test Account'
|
||||
KEYCARD_POPUP_HEADER_CREATE_SEED = 'Create a new Keycard account with a new seed phrase'
|
||||
KEYCARD_POPUP_HEADER_IMPORT_SEED = 'Import or restore a Keycard via a seed phrase'
|
||||
KEYCARD_POPUP_HEADER_SET_UP_EXISTING = 'Set up a new Keycard with an existing account'
|
||||
|
|
|
@ -219,7 +219,7 @@ class KeycardPopup(BasePopup):
|
|||
|
||||
@allure.step('Name keycard and account')
|
||||
def name_keycard_and_account(self, keycard_name, account_name):
|
||||
self.name_keycard(keycard_name).click_next()
|
||||
self.name_keycard(keycard_name)
|
||||
self.name_account(account_name).click_next()
|
||||
|
||||
@allure.step('Import keycard via seed phrase')
|
||||
|
|
|
@ -18,9 +18,8 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703627', 'Check whats on a Keycard')
|
||||
@pytest.mark.case(703627)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_check_whats_on_keycard(main_screen: MainWindow, user_account, options):
|
||||
def test_check_whats_on_keycard(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
||||
with step('Choose option Check whats on keycard in settings'):
|
||||
|
@ -46,6 +45,7 @@ def test_check_whats_on_keycard(main_screen: MainWindow, user_account, options):
|
|||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), "There is no correct keycard instruction"
|
||||
|
||||
with step('Keycard image source path is correct'):
|
||||
time.sleep(2)
|
||||
assert INSERT_KEYCARD_IMAGE_PATH == keycard_popup.keycard_image_source_path
|
||||
|
||||
with step('Register and insert not status keycard'):
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import time
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from allure import step
|
||||
|
@ -14,7 +16,6 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703624',
|
||||
'Create a new keycard account with a new seed phrase')
|
||||
@pytest.mark.case(703624)
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.parametrize(
|
||||
'name, color, emoji_name, emoji, name1, color1, emoji1_name, emoji1, name2, color2, emoji2_name, emoji2',
|
||||
[
|
||||
|
@ -22,7 +23,7 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
'thumbsup', '👍 ', 'Test Account3', '#ff7d46', 'cool', '🆒 ')
|
||||
])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_create_keycard_account_with_new_seed_phrase(main_screen: MainWindow, options, name, color, emoji_name, emoji,
|
||||
def test_create_keycard_account_with_new_seed_phrase(main_screen: MainWindow, name, color, emoji_name, emoji,
|
||||
name1, color1, emoji1_name, emoji1, name2, color2, emoji2_name,
|
||||
emoji2):
|
||||
with step('Choose option Create a new Keycard account with a new seed phrase in settings'):
|
||||
|
@ -52,6 +53,7 @@ def test_create_keycard_account_with_new_seed_phrase(main_screen: MainWindow, op
|
|||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), "There is no correct keycard instruction"
|
||||
|
||||
with step('Keycard image source path is correct'):
|
||||
time.sleep(2)
|
||||
assert INSERT_KEYCARD_IMAGE_PATH == keycard_popup.keycard_image_source_path
|
||||
|
||||
with step('Register and insert keycard'):
|
||||
|
|
|
@ -15,9 +15,8 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703628', 'Factory reset a Keycard')
|
||||
@pytest.mark.case(703628)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_factory_reset_keycard(main_screen: MainWindow, user_account, options):
|
||||
def test_factory_reset_keycard(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
||||
with step('Open keycard settings'):
|
||||
|
@ -74,9 +73,8 @@ def test_factory_reset_keycard(main_screen: MainWindow, user_account, options):
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704606', 'Factory reset a Keycard: incorrect PIN')
|
||||
@pytest.mark.case(704606)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_factory_reset_keycard_incorrect_pin(main_screen: MainWindow, user_account, options):
|
||||
def test_factory_reset_keycard_incorrect_pin(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
||||
with step('Open keycard settings'):
|
||||
|
|
|
@ -18,9 +18,8 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
'Import or restore a Keycard via a seed phrase')
|
||||
@pytest.mark.case(703625)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow, user_account, options):
|
||||
def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow, user_account):
|
||||
with step('Choose option Import or restore account via seed phrase in settings'):
|
||||
main_screen.prepare()
|
||||
keycard_settings = main_screen.left_panel.open_settings().left_panel.open_keycard_settings()
|
||||
|
@ -47,6 +46,7 @@ def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow, user_ac
|
|||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), "There is no correct keycard instruction"
|
||||
|
||||
with step('Keycard image source path is correct'):
|
||||
time.sleep(2)
|
||||
assert INSERT_KEYCARD_IMAGE_PATH == keycard_popup.keycard_image_source_path
|
||||
|
||||
with step('Register and insert keycard'):
|
||||
|
|
|
@ -22,9 +22,8 @@ from gui.mocked_keycard_controller import MockedKeycardController
|
|||
@pytest.mark.case(703623)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('account_name', [pytest.param('Status account')])
|
||||
@pytest.mark.parametrize('options', [aut_options.MOCK_KEYCARD])
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
|
||||
def test_setup_keycard_with_existing_account(main_screen: MainWindow, user_account, account_name, options):
|
||||
def test_setup_keycard_with_existing_account(main_screen: MainWindow, user_account, account_name):
|
||||
main_screen.prepare()
|
||||
|
||||
with step('Choose option Setup keycard with existing account in settings'):
|
||||
|
@ -113,7 +112,7 @@ def test_setup_keycard_with_existing_account(main_screen: MainWindow, user_accou
|
|||
"There is no correct keycard instruction"
|
||||
|
||||
with step('Create keycard account using new seed phrase'):
|
||||
keycard_popup.reveal_seed_phrase_and_confirm_words()
|
||||
keycard_popup.confirm_seed_phrase()
|
||||
authenticate_popup = AuthenticatePopup().wait_until_appears()
|
||||
authenticate_popup.authenticate(user_account.password)
|
||||
|
||||
|
|
Loading…
Reference in New Issue