diff --git a/tests/onboarding/test_onboarding_generate_new_keys.py b/tests/onboarding/test_onboarding_generate_new_keys.py index 8c219f23..b845cb77 100755 --- a/tests/onboarding/test_onboarding_generate_new_keys.py +++ b/tests/onboarding/test_onboarding_generate_new_keys.py @@ -3,6 +3,7 @@ import string import allure +import psutil import pytest from allure import step from . import marks @@ -28,8 +29,11 @@ def keys_screen(main_window) -> KeysView: @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703421', 'Generate new keys') -@pytest.mark.case(703421) +@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit') +@pytest.mark.case(703421, 703010) @pytest.mark.critical +@pytest.mark.flaky +# reason='https://github.com/status-im/status-desktop/issues/13013' @pytest.mark.parametrize('user_name, password, user_image, zoom, shift', [ pytest.param( ''.join((random.choice( @@ -44,7 +48,7 @@ def keys_screen(main_window) -> KeysView: 5, shift_image(0, 1000, 1000, 0)) ]) -def test_generate_new_keys(main_window, keys_screen, user_name: str, password, user_image: str, zoom: int, shift): +def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen, user_name: str, password, user_image: str, zoom: int, shift): with step('Click generate new keys and open profile view'): profile_view = keys_screen.generate_new_keys() @@ -118,3 +122,14 @@ def test_generate_new_keys(main_window, keys_screen, user_name: str, password, u f'Chat key in user profile is wrong, current: {profile_popup_chat_key}, expected: {chat_key}' assert profile_popup.get_emoji_hash == emoji_hash_public_key, \ f'Public keys should match when they dont' + + with step('Click left panel and open settings'): + main_window.left_panel.click() + settings = main_window.left_panel.open_settings() + + with step('Click sign out and quit in settings'): + sign_out_screen = settings.left_panel.open_sign_out_and_quit() + sign_out_screen.sign_out_and_quit() + + with step('Check the application process is not running'): + psutil.Process(aut.pid).wait(timeout=10) \ No newline at end of file diff --git a/tests/settings/test_settings_sign_out_and_quit.py b/tests/settings/test_settings_sign_out_and_quit.py deleted file mode 100644 index 042aa948..00000000 --- a/tests/settings/test_settings_sign_out_and_quit.py +++ /dev/null @@ -1,26 +0,0 @@ -import allure -import pytest -import psutil -from allure_commons._allure import step -from gui.main_window import MainWindow -from . import marks - -pytestmark = marks - - -@pytest.mark.critical -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit') -@pytest.mark.case(703010) -@pytest.mark.flaky -# reason='https://github.com/status-im/status-desktop/issues/13013' -def test_sign_out_and_quit(aut, main_screen: MainWindow): - with step('Open settings'): - settings = main_screen.left_panel.open_settings() - - with step('Click sign out and quit in settings'): - sign_out_screen = settings.left_panel.open_sign_out_and_quit() - sign_out_screen.sign_out_and_quit() - - with step('Check that app was closed'): - psutil.Process(aut.pid).wait(timeout=10) -