Skip to content

Commit

Permalink
e2e: align with new communities / cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
churik committed Apr 28, 2023
1 parent 2f988fc commit b1f0f22
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 342 deletions.
117 changes: 58 additions & 59 deletions test/appium/tests/critical/chats/test_1_1_public_chats.py

Large diffs are not rendered by default.

23 changes: 10 additions & 13 deletions test/appium/tests/critical/chats/test_group_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def prepare_devices(self):
sign_in = SignInView(self.drivers[key])
self.homes[key] = sign_in.create_user(enable_notifications=True)
SignInView(self.drivers[2]).put_app_to_background_and_back()
self.public_keys[key], self.usernames[key] = sign_in.get_public_key_and_username(True)
self.public_keys[key], self.usernames[key] = sign_in.get_public_key(True)
sign_in.home_button.click()
SignInView(self.drivers[0]).put_app_to_background_and_back()
self.chat_name = self.homes[0].get_random_chat_name()
Expand Down Expand Up @@ -150,31 +150,29 @@ def prepare_devices(self):
self.message_to_admin = 'Hey, admin!'
self.public_keys, self.usernames, self.chats = {}, {}, {}
sign_in_views = [SignInView(self.drivers[key]) for key in self.drivers]
self.usernames = ('user admin', 'member_1', 'member_2')
self.loop.run_until_complete(
run_in_parallel(
(
(sign_in_views[0].create_user, {'enable_notifications': True}),
(sign_in_views[1].create_user, {'enable_notifications': True, 'username': "test user1"}),
(sign_in_views[2].create_user, {'enable_notifications': True, 'username': "test user2"})
(sign_in_views[0].create_user, {'enable_notifications': True, 'username': self.usernames[0]}),
(sign_in_views[1].create_user, {'enable_notifications': True, 'username': self.usernames[1]}),
(sign_in_views[2].create_user, {'enable_notifications': True, 'username': self.usernames[2]})
)
)
)
self.homes = [sign_in.get_home_view() for sign_in in sign_in_views]
users = self.loop.run_until_complete(
self.public_keys = self.loop.run_until_complete(
run_in_parallel(
(
(self.homes[0].get_public_key_and_username, {'return_username': True}),
(self.homes[1].get_public_key_and_username, {'return_username': True}),
(self.homes[2].get_public_key_and_username, {'return_username': True})
(self.homes[0].get_public_key,),
(self.homes[1].get_public_key,),
(self.homes[2].get_public_key,)
)
)
)

self.homes[0].just_fyi('Admin adds future members to contacts')

for i in range(3):
self.public_keys[i], self.usernames[i] = users[i]

for i in range(3):
self.homes[i].click_system_back_button_until_element_is_shown()
self.homes[i].chats_tab.click()
Expand All @@ -198,8 +196,7 @@ def prepare_devices(self):
self.chat_name = self.homes[0].get_random_chat_name()
self.homes[0].chats_tab.click()
self.chats[0] = self.homes[0].create_group_chat(user_names_to_add=[self.usernames[1], self.usernames[2]],
group_chat_name=self.chat_name,
new_ui=True)
group_chat_name=self.chat_name)
for i in range(1, 3):
self.chats[i] = ChatView(self.drivers[i])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def prepare_devices(self):
@marks.testrail_id(700748)
def test_restore_uppercase_whitespaces_seed_phrase_special_char_passw_logcat(self):
profile = self.home.profile_button.click()
public_key, username = self.sign_in.get_public_key_and_username(return_username=True)
public_key, username = self.sign_in.get_public_key()

self.sign_in.just_fyi("Check public key matches expected and no back up seed phrase is available")
profile.privacy_and_security_button.click()
Expand Down Expand Up @@ -453,7 +453,7 @@ def test_restore_account_migrate_multiaccount_to_keycard_no_db_saved_add_wallet_
self.errors.append('Restored address %s does not match expected' % address)

self.sign_in.just_fyi('Check that after migration username and public key match expected')
public_key, default_username = self.sign_in.get_public_key_and_username(return_username=True)
public_key, default_username = self.sign_in.get_public_key()
profile = self.sign_in.get_profile_view()
if public_key != self.user['public_key']:
self.errors.append('Public key %s does not match expected' % public_key)
Expand Down
Loading

0 comments on commit b1f0f22

Please sign in to comment.