From 2858abeb9813eaa6a5db0f223560392924d7511a Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Wed, 27 Mar 2024 12:38:50 +0300 Subject: [PATCH] add missing parameter, renamed function, removed super() from aut class (no parent exists) --- test/e2e/driver/aut.py | 1 - test/e2e/fixtures/aut.py | 2 +- .../communities/test_communities_pin_and_unpin_messages.py | 4 ++-- test/e2e/tests/messages/test_1x1_chat.py | 4 ++-- test/e2e/tests/messages/test_messaging_group_chat.py | 4 ++-- test/e2e/tests/onboarding/test_onboarding_syncing.py | 4 ++-- test/e2e/tests/online_identifier/test_online_identifier.py | 4 ++-- .../test_messaging_settings_accept_request.py | 4 ++-- .../test_messaging_settings_identity_verification.py | 4 ++-- .../test_messaging_settings_reject_request.py | 4 ++-- 10 files changed, 17 insertions(+), 18 deletions(-) diff --git a/test/e2e/driver/aut.py b/test/e2e/driver/aut.py index df98d13359..e3194425f9 100644 --- a/test/e2e/driver/aut.py +++ b/test/e2e/driver/aut.py @@ -26,7 +26,6 @@ class AUT: app_path: system_path.SystemPath = configs.AUT_PATH, user_data: SystemPath = None ): - super(AUT, self).__init__() self.path = app_path self.ctx = None self.pid = None diff --git a/test/e2e/fixtures/aut.py b/test/e2e/fixtures/aut.py index e86261d18d..2d640086f4 100644 --- a/test/e2e/fixtures/aut.py +++ b/test/e2e/fixtures/aut.py @@ -46,7 +46,7 @@ def aut(user_data) -> AUT: @pytest.fixture() -def multiple_instance(): +def multiple_instances(user_data): def _aut(user_data: SystemPath = None) -> AUT: if not configs.AUT_PATH.exists(): pytest.exit(f"Application not found: {configs.AUT_PATH}") diff --git a/test/e2e/tests/communities/test_communities_pin_and_unpin_messages.py b/test/e2e/tests/communities/test_communities_pin_and_unpin_messages.py index 2060a7db61..3f1a18bc4b 100644 --- a/test/e2e/tests/communities/test_communities_pin_and_unpin_messages.py +++ b/test/e2e/tests/communities/test_communities_pin_and_unpin_messages.py @@ -28,14 +28,14 @@ pytestmark = marks @pytest.mark.parametrize('user_data_one, user_data_two', [ (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_join_community_and_pin_unpin_message(multiple_instance, user_data_one, user_data_two): +def test_join_community_and_pin_unpin_message(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two community_params = deepcopy(constants.community_params) community_params['name'] = f'{datetime.now():%d%m%Y_%H%M%S}' main_screen = MainWindow() - with multiple_instance() as aut_one, multiple_instance() as aut_two: + with multiple_instances(user_data_one) as aut_one, multiple_instances(user_data_two) as aut_two: with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach() diff --git a/test/e2e/tests/messages/test_1x1_chat.py b/test/e2e/tests/messages/test_1x1_chat.py index dd13d908c6..6905abd450 100644 --- a/test/e2e/tests/messages/test_1x1_chat.py +++ b/test/e2e/tests/messages/test_1x1_chat.py @@ -23,14 +23,14 @@ pytestmark = marks @pytest.mark.parametrize('user_data_one, user_data_two', [ (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_1x1_chat(multiple_instance, user_data_one, user_data_two): +def test_1x1_chat(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two main_window = MainWindow() messages_screen = MessagesScreen() emoji = 'sunglasses' - with (multiple_instance() as aut_one, multiple_instance() as aut_two): + with (multiple_instances() as aut_one, multiple_instances() as aut_two): with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach() diff --git a/test/e2e/tests/messages/test_messaging_group_chat.py b/test/e2e/tests/messages/test_messaging_group_chat.py index 7ec7aee47a..7741039d5b 100644 --- a/test/e2e/tests/messages/test_messaging_group_chat.py +++ b/test/e2e/tests/messages/test_messaging_group_chat.py @@ -22,7 +22,7 @@ pytestmark = marks (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_group_chat(multiple_instance, user_data_one, user_data_two, user_data_three): +def test_group_chat(multiple_instances, user_data_one, user_data_two, user_data_three): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two user_three: UserAccount = constants.user_account_three @@ -30,7 +30,7 @@ def test_group_chat(multiple_instance, user_data_one, user_data_two, user_data_t main_window = MainWindow() messages_screen = MessagesScreen() - with multiple_instance() as aut_one, multiple_instance() as aut_two, multiple_instance() as aut_three: + with multiple_instances() as aut_one, multiple_instances() as aut_two, multiple_instances() as aut_three: with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two, aut_three], [user_one, user_two, user_three]): aut.attach() diff --git a/test/e2e/tests/onboarding/test_onboarding_syncing.py b/test/e2e/tests/onboarding/test_onboarding_syncing.py index c92866fc1d..841ffdf6aa 100644 --- a/test/e2e/tests/onboarding/test_onboarding_syncing.py +++ b/test/e2e/tests/onboarding/test_onboarding_syncing.py @@ -37,11 +37,11 @@ def sync_screen(main_window) -> SyncCodeView: @pytest.mark.case(703592) @pytest.mark.parametrize('user_data', [configs.testpath.TEST_USER_DATA / 'user_account_one']) @pytest.mark.critical -def test_sync_device_during_onboarding(multiple_instance, user_data): +def test_sync_device_during_onboarding(multiple_instances, user_data): user: UserAccount = constants.user_account_one main_window = MainWindow() - with (multiple_instance() as aut_one, multiple_instance() as aut_two): + with (multiple_instances() as aut_one, multiple_instances() as aut_two): with step('Get syncing code in first instance'): aut_one.attach() main_window.prepare() diff --git a/test/e2e/tests/online_identifier/test_online_identifier.py b/test/e2e/tests/online_identifier/test_online_identifier.py index 11999da2ce..fe9f53a831 100644 --- a/test/e2e/tests/online_identifier/test_online_identifier.py +++ b/test/e2e/tests/online_identifier/test_online_identifier.py @@ -44,14 +44,14 @@ def test_change_own_display_name(main_screen: MainWindow, user_account, new_name @pytest.mark.parametrize('user_data_one, user_data_two', [ (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_switch_state_to_offline_online_automatic(multiple_instance, user_data_one, user_data_two): +def test_switch_state_to_offline_online_automatic(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two community_params = deepcopy(constants.community_params) community_params['name'] = f'{datetime.now():%d%m%Y_%H%M%S}' main_screen = MainWindow() - with multiple_instance() as aut_one, multiple_instance() as aut_two: + with multiple_instances() as aut_one, multiple_instances() as aut_two: with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach() diff --git a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_accept_request.py b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_accept_request.py index da1e8f2a8a..687277ce20 100644 --- a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_accept_request.py +++ b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_accept_request.py @@ -19,12 +19,12 @@ pytestmark = marks (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) # TODO: reason='https://github.com/status-im/desktop-qa-automation/issues/346' -def test_messaging_settings_accepting_request(multiple_instance, user_data_one, user_data_two): +def test_messaging_settings_accepting_request(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two main_window = MainWindow() - with (multiple_instance() as aut_one, multiple_instance() as aut_two): + with (multiple_instances() as aut_one, multiple_instances() as aut_two): with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach() diff --git a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py index a0bd1e757c..708a263c8f 100644 --- a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py +++ b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py @@ -19,12 +19,12 @@ pytestmark = marks @pytest.mark.parametrize('user_data_one, user_data_two', [ (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_messaging_settings_identity_verification(multiple_instance, user_data_one, user_data_two): +def test_messaging_settings_identity_verification(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two main_window = MainWindow() - with multiple_instance() as aut_one, multiple_instance() as aut_two: + with multiple_instances() as aut_one, multiple_instances() as aut_two: with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach() diff --git a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_reject_request.py b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_reject_request.py index e23422d58e..04fec71c19 100644 --- a/test/e2e/tests/settings/settings_messaging/test_messaging_settings_reject_request.py +++ b/test/e2e/tests/settings/settings_messaging/test_messaging_settings_reject_request.py @@ -16,12 +16,12 @@ pytestmark = marks @pytest.mark.parametrize('user_data_one, user_data_two', [ (configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two') ]) -def test_messaging_settings_rejecting_request(multiple_instance, user_data_one, user_data_two): +def test_messaging_settings_rejecting_request(multiple_instances, user_data_one, user_data_two): user_one: UserAccount = constants.user_account_one user_two: UserAccount = constants.user_account_two main_window = MainWindow() - with multiple_instance() as aut_one, multiple_instance() as aut_two: + with multiple_instances() as aut_one, multiple_instances() as aut_two: with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'): for aut, account in zip([aut_one, aut_two], [user_one, user_two]): aut.attach()