2023-10-06 11:32:08 +00:00
|
|
|
import allure
|
|
|
|
import pytest
|
|
|
|
from allure_commons._allure import step
|
2023-12-07 16:47:34 +00:00
|
|
|
from . import marks
|
2023-10-06 11:32:08 +00:00
|
|
|
|
2023-11-20 13:06:02 +00:00
|
|
|
import configs
|
2023-10-09 17:01:13 +00:00
|
|
|
import driver
|
2023-10-06 11:32:08 +00:00
|
|
|
from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanner
|
|
|
|
from gui.main_window import MainWindow
|
|
|
|
|
2023-12-07 16:47:34 +00:00
|
|
|
pytestmark = marks
|
2023-12-13 16:16:35 +00:00
|
|
|
@pytest.mark.critical
|
2023-10-09 17:04:29 +00:00
|
|
|
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703001', 'Backup seed phrase')
|
2023-10-06 11:32:08 +00:00
|
|
|
@pytest.mark.case(703001)
|
|
|
|
def test_back_up_seed_phrase(main_screen: MainWindow):
|
2023-11-20 13:06:02 +00:00
|
|
|
with step('Check back up seed phrase option is visible for new account'):
|
2023-10-06 11:32:08 +00:00
|
|
|
settings = main_screen.left_panel.open_settings()
|
2023-10-09 17:01:13 +00:00
|
|
|
assert settings.left_panel.check_back_up_seed_option_present(), f"Back up seed option is not present"
|
2023-11-20 13:06:02 +00:00
|
|
|
if not configs.system.TEST_MODE:
|
|
|
|
assert BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is not present"
|
|
|
|
assert BackUpSeedPhraseBanner().is_back_up_now_button_present(), 'Back up now button is not present'
|
2023-10-09 17:01:13 +00:00
|
|
|
|
|
|
|
with step('Open back up seed phrase in settings'):
|
2023-10-06 11:32:08 +00:00
|
|
|
back_up = settings.left_panel.open_back_up_seed_phrase()
|
|
|
|
back_up.back_up_seed_phrase()
|
2023-10-09 17:01:13 +00:00
|
|
|
|
2023-10-06 11:32:08 +00:00
|
|
|
with step('Verify back up seed phrase banner disappeared'):
|
2023-10-09 17:01:13 +00:00
|
|
|
assert not settings.left_panel.check_back_up_seed_option_present(), f"Back up seed option is present"
|
2023-11-20 13:06:02 +00:00
|
|
|
if not configs.system.TEST_MODE:
|
|
|
|
BackUpSeedPhraseBanner().wait_to_hide_the_banner()
|
|
|
|
assert not BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is present"
|