From caef79d2eec10b6ecee1d60222ffc07f15b83990 Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Wed, 13 Dec 2023 19:16:35 +0300 Subject: [PATCH] chore: select tests to run against PRs Selected a few to run by critical mark in PRs --- test/e2e/pytest.ini | 1 + test/e2e/tests/communities/test_airdrops.py | 2 -- .../e2e/tests/communities/test_communities.py | 3 +- .../test_communities_categories.py | 8 +++-- .../communities/test_communities_channels.py | 3 +- .../e2e/tests/communities/test_permissions.py | 1 - test/e2e/tests/communities/test_tokens.py | 2 +- .../test_onboarding_generate_new_keys.py | 34 ------------------- test/e2e/tests/online_identifier/__init__.py | 3 ++ .../test_online_identifier.py | 3 +- .../test_settings_profile_change_password.py | 3 +- ...ttings_acct_interactions_delete_account.py | 1 + .../settings/test_settings_back_up_seed.py | 1 + .../test_settings_sign_out_and_quit.py | 2 ++ ...est_context_menu_manage_watched_address.py | 1 + 15 files changed, 23 insertions(+), 45 deletions(-) diff --git a/test/e2e/pytest.ini b/test/e2e/pytest.ini index 699ba6ba01..b6542e4402 100644 --- a/test/e2e/pytest.ini +++ b/test/e2e/pytest.ini @@ -21,4 +21,5 @@ markers = onboarding: All tests related to onboarding keycard: All tests related to Keycard functionality wallet: All tests related to wallet functionality + online_identifier: All tests related to online_identifier functionality diff --git a/test/e2e/tests/communities/test_airdrops.py b/test/e2e/tests/communities/test_airdrops.py index 0a7c650515..cdf9fe62c6 100644 --- a/test/e2e/tests/communities/test_airdrops.py +++ b/test/e2e/tests/communities/test_airdrops.py @@ -7,7 +7,6 @@ import constants from constants.community_settings import AirdropsElements from constants.images_paths import AIRDROPS_WELCOME_IMAGE_PATH from gui.main_window import MainWindow -from scripts.tools import image pytestmark = marks @@ -15,7 +14,6 @@ pytestmark = marks 'Manage community: Manage Airdrops screen overview') @pytest.mark.case(703200) @pytest.mark.parametrize('params', [constants.community_params]) -@pytest.mark.skip(reason='https://github.com/status-im/desktop-qa-automation/issues/186') def test_airdrops_screen(main_screen: MainWindow, params): with step('Create community'): main_screen.create_community(params) diff --git a/test/e2e/tests/communities/test_communities.py b/test/e2e/tests/communities/test_communities.py index d0109b9753..e3255d8e61 100644 --- a/test/e2e/tests/communities/test_communities.py +++ b/test/e2e/tests/communities/test_communities.py @@ -11,6 +11,7 @@ from gui.main_window import MainWindow pytestmark = marks + @pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703084', 'Create community') @pytest.mark.case(703084) @@ -44,7 +45,7 @@ def test_create_community(user_account, main_screen: MainWindow, params): community = community_settings.get_community_info(params['name']) assert community.name == params['name'] assert community.description == params['description'] - # assert '1' in community.members TODO: Test on linux, members label is not visible + assert '1' in community.members @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703056', 'Edit community separately') diff --git a/test/e2e/tests/communities/test_communities_categories.py b/test/e2e/tests/communities/test_communities_categories.py index bb663e25f4..6e88121e77 100644 --- a/test/e2e/tests/communities/test_communities_categories.py +++ b/test/e2e/tests/communities/test_communities_categories.py @@ -4,12 +4,15 @@ from allure_commons._allure import step import constants from gui.main_window import MainWindow +from . import marks + +pytestmark = marks @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703226', 'Add category') @pytest.mark.case(703226) @pytest.mark.parametrize('category_name, general_checkbox', [ - pytest.param('Category in general', True), + pytest.param('Category in general', True, marks=pytest.mark.critical), pytest.param('Category out of general', False) ]) def test_create_community_category(main_screen: MainWindow, category_name, general_checkbox): @@ -36,7 +39,8 @@ def test_remove_community_category(main_screen: MainWindow, category_name, gener community_screen.verify_category(category_name) with step('Create channel inside category'): - community_screen.left_panel.open_new_channel_popup_in_category().create(channel_name, channel_description, channel_emoji) + community_screen.left_panel.open_new_channel_popup_in_category().create(channel_name, channel_description, + channel_emoji) with step('Delete category'): community_screen.delete_category() diff --git a/test/e2e/tests/communities/test_communities_channels.py b/test/e2e/tests/communities/test_communities_channels.py index bd7d6b9a4c..ae6d22ac7a 100644 --- a/test/e2e/tests/communities/test_communities_channels.py +++ b/test/e2e/tests/communities/test_communities_channels.py @@ -4,7 +4,7 @@ from allure_commons._allure import step import constants from gui.main_window import MainWindow -from gui.screens.community import CommunityScreen +from . import marks @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703049', 'Create community channel') @@ -62,7 +62,6 @@ def test_edit_community_channel(main_screen, channel_name, channel_description, @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703051', 'Delete community channel') @pytest.mark.case(703051) def test_delete_community_channel(main_screen): - with step('Create simple community'): main_screen.create_community(constants.community_params) community_screen = main_screen.left_panel.select_community(constants.community_params['name']) diff --git a/test/e2e/tests/communities/test_permissions.py b/test/e2e/tests/communities/test_permissions.py index 74c9f9c0f6..57821de4b8 100644 --- a/test/e2e/tests/communities/test_permissions.py +++ b/test/e2e/tests/communities/test_permissions.py @@ -16,7 +16,6 @@ pytestmark = marks 'Manage community: Manage Permissions screen overview') @pytest.mark.case(703198) @pytest.mark.parametrize('params', [constants.community_params]) -@pytest.mark.skip(reason='https://github.com/status-im/desktop-qa-automation/issues/186') def test_permissions_screen_overview(main_screen: MainWindow, params): main_screen.create_community(params) diff --git a/test/e2e/tests/communities/test_tokens.py b/test/e2e/tests/communities/test_tokens.py index 8b38b94e52..d7c9b3b4af 100644 --- a/test/e2e/tests/communities/test_tokens.py +++ b/test/e2e/tests/communities/test_tokens.py @@ -11,11 +11,11 @@ from scripts.tools import image pytestmark = marks + @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703199', 'Manage community: Manage Mint Tokens screen overview') @pytest.mark.case(703199) @pytest.mark.parametrize('params', [constants.community_params]) -@pytest.mark.skip(reason='https://github.com/status-im/desktop-qa-automation/issues/186') def test_tokens_screen(main_screen: MainWindow, params): with step('Create community'): main_screen.create_community(params) diff --git a/test/e2e/tests/onboarding/test_onboarding_generate_new_keys.py b/test/e2e/tests/onboarding/test_onboarding_generate_new_keys.py index e0c4da1f39..fbc43417ff 100755 --- a/test/e2e/tests/onboarding/test_onboarding_generate_new_keys.py +++ b/test/e2e/tests/onboarding/test_onboarding_generate_new_keys.py @@ -14,7 +14,6 @@ from gui.components.splash_screen import SplashScreen from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, BiometricsView, KeysView pytestmark = marks -LOG = logging.getLogger(__name__) @pytest.fixture @@ -34,7 +33,6 @@ def keys_screen(main_window) -> KeysView: pytest.param('Test-User', '*P@ssw0rd*', 'tv_signal.png', 5, shift_image(0, 0, 0, 0)), pytest.param('_1Test-User', '*P@ssw0rd*', 'tv_signal.jpeg', 5, shift_image(0, 1000, 1000, 0)) ]) -@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/218") def test_generate_new_keys(main_window, keys_screen, user_name: str, password, user_image: str, zoom: int, shift): with step(f'Setup profile with name: {user_name} and image: {user_image}'): @@ -50,19 +48,6 @@ def test_generate_new_keys(main_window, keys_screen, user_name: str, password, u with step('Open Profile details view and verify user info'): details_view = profile_view.next() - # TODO: temp removing tesseract usage because it is not stable - # if user_image is None: - # assert not details_view.is_user_image_background_white() - # assert driver.waitFor( - # lambda: details_view.is_user_image_contains(user_name[:2]), - # configs.timeouts.UI_LOAD_TIMEOUT_MSEC - # ) - # else: - # image.compare( - # details_view.cropped_profile_image, - # f'{user_image.split(".")[1]}_onboarding.png', - # threshold=0.9 - # ) chat_key = details_view.chat_key emoji_hash = details_view.emoji_hash assert details_view.is_identicon_ring_visible @@ -87,28 +72,9 @@ def test_generate_new_keys(main_window, keys_screen, user_name: str, password, u user_canvas = main_window.left_panel.open_online_identifier() assert user_canvas.user_name == user_name - # TODO: temp removing tesseract usage because it is not stable - # if user_image is None: - # assert driver.waitFor( - # lambda: user_canvas.is_user_image_contains(user_name[:2]), - # configs.timeouts.UI_LOAD_TIMEOUT_MSEC - # ) with step('Open Profile popup and verify user info'): profile_popup = user_canvas.open_profile_popup_from_online_identifier() assert profile_popup.user_name == user_name assert profile_popup.chat_key == chat_key - assert profile_popup.emoji_hash.compare(emoji_hash.view, threshold=0.9) - # TODO: temp removing tesseract usage because it is not stable - # if user_image is None: - # assert driver.waitFor( - # lambda: profile_popup.is_user_image_contains(user_name[:2]), - # configs.timeouts.UI_LOAD_TIMEOUT_MSEC - # ) - # else: - # image.compare( - # profile_popup.cropped_profile_image, - # f'{user_image.split(".")[1]}_profile.png', - # threshold=0.9 - # ) diff --git a/test/e2e/tests/online_identifier/__init__.py b/test/e2e/tests/online_identifier/__init__.py index e69de29bb2..d6176c1ecf 100644 --- a/test/e2e/tests/online_identifier/__init__.py +++ b/test/e2e/tests/online_identifier/__init__.py @@ -0,0 +1,3 @@ +import pytest + +marks = pytest.mark.online_identifier \ No newline at end of file diff --git a/test/e2e/tests/online_identifier/test_online_identifier.py b/test/e2e/tests/online_identifier/test_online_identifier.py index 5d6b4e4c2f..e1c4ff1e82 100644 --- a/test/e2e/tests/online_identifier/test_online_identifier.py +++ b/test/e2e/tests/online_identifier/test_online_identifier.py @@ -5,8 +5,9 @@ from allure import step import constants from driver.aut import AUT from gui.main_window import MainWindow +from . import marks -pytestmark = allure.suite("Settings") +pytestmark = marks @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703007', diff --git a/test/e2e/tests/settings/settings_profile/test_settings_profile_change_password.py b/test/e2e/tests/settings/settings_profile/test_settings_profile_change_password.py index f3e980524a..f63ec84909 100644 --- a/test/e2e/tests/settings/settings_profile/test_settings_profile_change_password.py +++ b/test/e2e/tests/settings/settings_profile/test_settings_profile_change_password.py @@ -9,13 +9,14 @@ from gui.main_window import MainWindow pytestmark = marks +@pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703005', 'Change the password and login with new password') @pytest.mark.case(703005) @pytest.mark.parametrize('user_account, user_account_changed_password', [pytest.param(constants.user.user_account_one, constants.user.user_account_one_changed_password)]) -@pytest.mark.skip(reason="unstable") + def test_change_password_and_login(aut: AUT, main_screen: MainWindow, user_account, user_account_changed_password): with step('Open profile settings and change password'): main_screen.left_panel.open_settings().left_panel.open_profile_settings().open_change_password_popup().change_password( diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py index 90f9b04110..967733f14a 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py @@ -16,6 +16,7 @@ from gui.main_window import MainWindow from gui.screens.settings_wallet import WalletSettingsView pytestmark = marks +@pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704454', 'Account view interactions: Delete generated account') @pytest.mark.case(704454) diff --git a/test/e2e/tests/settings/test_settings_back_up_seed.py b/test/e2e/tests/settings/test_settings_back_up_seed.py index a17eb1b098..2de403281b 100644 --- a/test/e2e/tests/settings/test_settings_back_up_seed.py +++ b/test/e2e/tests/settings/test_settings_back_up_seed.py @@ -9,6 +9,7 @@ from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanne from gui.main_window import MainWindow pytestmark = marks +@pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703001', 'Backup seed phrase') @pytest.mark.case(703001) def test_back_up_seed_phrase(main_screen: MainWindow): diff --git a/test/e2e/tests/settings/test_settings_sign_out_and_quit.py b/test/e2e/tests/settings/test_settings_sign_out_and_quit.py index 02d79eea00..042aa9488b 100644 --- a/test/e2e/tests/settings/test_settings_sign_out_and_quit.py +++ b/test/e2e/tests/settings/test_settings_sign_out_and_quit.py @@ -8,6 +8,7 @@ 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 @@ -22,3 +23,4 @@ def test_sign_out_and_quit(aut, main_screen: MainWindow): with step('Check that app was closed'): psutil.Process(aut.pid).wait(timeout=10) + diff --git a/test/e2e/tests/wallet_main_screen/test_context_menu_manage_watched_address.py b/test/e2e/tests/wallet_main_screen/test_context_menu_manage_watched_address.py index 62ba2411f5..3bb356d13c 100644 --- a/test/e2e/tests/wallet_main_screen/test_context_menu_manage_watched_address.py +++ b/test/e2e/tests/wallet_main_screen/test_context_menu_manage_watched_address.py @@ -11,6 +11,7 @@ from gui.components.toast_message import ToastMessage from gui.main_window import MainWindow pytestmark = marks +@pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703026', 'Manage a watch-only account from context menu option') @pytest.mark.case(703026)