add missing parameter, renamed function, removed super() from aut class (no parent exists)
This commit is contained in:
parent
bdeb0f6c3d
commit
2858abeb98
|
@ -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
|
||||
|
|
|
@ -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}")
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue