diff --git a/driver/aut.py b/driver/aut.py index df98d13..e319442 100644 --- a/driver/aut.py +++ b/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/fixtures/aut.py b/fixtures/aut.py index e86261d..2d64008 100644 --- a/fixtures/aut.py +++ b/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/tests/communities/test_communities_pin_and_unpin_messages.py b/tests/communities/test_communities_pin_and_unpin_messages.py index 2060a7d..3f1a18b 100644 --- a/tests/communities/test_communities_pin_and_unpin_messages.py +++ b/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/tests/messages/test_1x1_chat.py b/tests/messages/test_1x1_chat.py index dd13d90..6905abd 100644 --- a/tests/messages/test_1x1_chat.py +++ b/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/tests/messages/test_messaging_group_chat.py b/tests/messages/test_messaging_group_chat.py index 7ec7aee..7741039 100644 --- a/tests/messages/test_messaging_group_chat.py +++ b/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/tests/onboarding/test_onboarding_syncing.py b/tests/onboarding/test_onboarding_syncing.py index c92866f..841ffdf 100644 --- a/tests/onboarding/test_onboarding_syncing.py +++ b/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/tests/online_identifier/test_online_identifier.py b/tests/online_identifier/test_online_identifier.py index 11999da..fe9f53a 100644 --- a/tests/online_identifier/test_online_identifier.py +++ b/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/tests/settings/settings_messaging/test_messaging_settings_accept_request.py b/tests/settings/settings_messaging/test_messaging_settings_accept_request.py index da1e8f2..687277c 100644 --- a/tests/settings/settings_messaging/test_messaging_settings_accept_request.py +++ b/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/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py b/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py index a0bd1e7..708a263 100644 --- a/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py +++ b/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/tests/settings/settings_messaging/test_messaging_settings_reject_request.py b/tests/settings/settings_messaging/test_messaging_settings_reject_request.py index e23422d..04fec71 100644 --- a/tests/settings/settings_messaging/test_messaging_settings_reject_request.py +++ b/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()