Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for 2 high e2e #9148

Merged
merged 1 commit into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions test/appium/tests/atomic/account_management/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ def test_pair_devices_sync_one_to_one_contacts(self):
device_1_home = device_1.create_user()
device_1_home.profile_button.click()
device_1_profile = device_1_home.get_profile_view()
device_1_profile.privacy_and_security_button.click()
device_1_profile.backup_recovery_phrase_button.click()
device_1_profile.ok_continue_button.click()
recovery_phrase = device_1_profile.get_recovery_phrase()
Expand All @@ -553,12 +554,12 @@ def test_pair_devices_sync_one_to_one_contacts(self):
message_before_sync = 'sent before sync'
message_after_sync = 'sent after sync'

# device 1: add contact, start 1-1 chat with basic user
device_1.just_fyi('add contact, start 1-1 chat with basic user')
device_1_chat = device_1_home.add_contact(basic_user['public_key'])
device_1_chat.chat_message_input.send_keys(message_before_sync)
device_1_chat.send_message_button.click()

# device 2: go to profile > Devices, set device name, discover device 2 to device 1
device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1')
device_2_home = device_2.recover_access(passphrase=' '.join(recovery_phrase.values()))
device_2_profile = device_2_home.get_profile_view()
device_2_profile.discover_and_advertise_device(device_2_name)
Expand All @@ -567,21 +568,22 @@ def test_pair_devices_sync_one_to_one_contacts(self):
device_1_profile.sync_all_button.click()
device_1_profile.sync_all_button.wait_for_visibility_of_element(15)

# device 2: check that contact is appeared in Contact list
device_2.just_fyi('check that contact is appeared in Contact list')
device_2_profile.back_button.click()
device_2_profile.back_button.click()
device_2_profile.contacts_button.scroll_to_element(9, 'up')
device_2_profile.contacts_button.click()
if not device_2_profile.element_by_text(basic_user['username']).is_element_displayed():
self.errors.append('"%s" is not found in Contacts after initial sync' % basic_user['username'])

# device 1: send message to 1-1 chat with basic user and add another contact
device_1.just_fyi('send message to 1-1 chat with basic user and add another contact')
device_1_chat.get_back_to_home_view()
device_1_chat.chat_message_input.send_keys(message_after_sync)
device_1_chat.send_message_button.click()
device_1_chat.back_button.click()
device_1_home.add_contact(transaction_senders['A']['public_key'])

# device 2: check that messages appeared in 1-1 chat and new contacts are synced
device_2.just_fyi('check that messages appeared in 1-1 chat and new contacts are synced')
if not device_2_profile.element_by_text(transaction_senders['A']['username']):
self.errors.append(
'"%s" is not found in Contacts after adding when devices are paired' % transaction_senders['A'][
Expand Down
11 changes: 6 additions & 5 deletions test/appium/views/base_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,13 @@ def image(self):

def attribute_value(self, value):
attribute_value = self.find_element().get_attribute(value)
if attribute_value == 'true' or 'True':
return True
elif attribute_value == 'false' or 'False':
return False
if attribute_value.lower() == 'true':
attribute_state = True
elif attribute_value.lower() == 'false':
attribute_state = False
else:
return attribute_value
attribute_state = attribute_value
return attribute_state

def is_element_image_equals_template(self, file_name: str = ''):
if file_name:
Expand Down