mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 17:54:32 +00:00
Test activity cener with only-contacts setting
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
cf9f160de9
commit
19eda04c90
@ -336,8 +336,8 @@ class TestCreateAccount(SingleDeviceTestCase):
|
||||
sign_in.toggle_mobile_data()
|
||||
sign_in.element_by_text_part('Stop syncing').wait_and_click(60)
|
||||
sign_in.wallet_button.click()
|
||||
if wallet_view.asset_by_name('LXS').is_element_displayed():
|
||||
self.errors.append('Token balance is fetched while on cellular network!')
|
||||
if not wallet_view.element_by_text_part('LXS').is_element_displayed():
|
||||
self.errors.append('Token balance is not fetched while on cellular network!')
|
||||
|
||||
wallet_view.just_fyi('Add watch-only account when on cellular network')
|
||||
wallet_view.add_account_button.click()
|
||||
|
@ -1047,3 +1047,57 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
||||
self.errors.append('ENS-owner user is not available in mention suggestion list of Group chat')
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(695771)
|
||||
@marks.medium
|
||||
def test_open_user_profile_long_press_on_message(self):
|
||||
self.create_drivers(2)
|
||||
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
message_from_sender = "Message sender"
|
||||
GroupChat1Name = "GroupChat1"
|
||||
GroupChat2Name = "GroupChat2"
|
||||
home_1, home_2 = device_1.create_user(), device_2.create_user()
|
||||
|
||||
device_1.just_fyi('Device1 sets permissions to accept chat requests only from trusted contacts')
|
||||
profile_1 = home_1.profile_button.click()
|
||||
profile_1.privacy_and_security_button.click()
|
||||
profile_1.accept_new_chats_from.click()
|
||||
profile_1.accept_new_chats_from_contacts_only.click()
|
||||
profile_1.profile_button.click()
|
||||
public_key_user_1, username_1 = profile_1.get_public_key_and_username(return_username=True)
|
||||
public_key_user_2, username_2 = home_2.get_public_key_and_username(return_username=True)
|
||||
|
||||
device_1.just_fyi('Device2 creates 1-1 chat Group chats')
|
||||
home_2.home_button.click()
|
||||
one_to_one_device_2 = home_2.add_contact(public_key_user_1)
|
||||
one_to_one_device_2.send_message(message_from_sender)
|
||||
one_to_one_device_2.home_button.click()
|
||||
home_2.create_group_chat([username_1], group_chat_name=GroupChat1Name)
|
||||
|
||||
device_1.just_fyi('Device1 check there are no any chats in Activity Center nor Chats view')
|
||||
|
||||
home_1.home_button.click()
|
||||
if home_1.element_by_text_part(username_2).is_element_displayed() or home_1.element_by_text_part(GroupChat1Name).is_element_displayed():
|
||||
self.errors.append("Chats are present on Chats view despite they created by non-contact")
|
||||
home_1.notifications_button.click()
|
||||
if home_1.element_by_text_part(username_2).is_element_displayed() or home_1.element_by_text_part(GroupChat1Name).is_element_displayed():
|
||||
self.errors.append("Chats are present in Activity Center view despite they created by non-contact")
|
||||
|
||||
device_1.just_fyi('Device1 adds Device2 in Contacts so chat requests should be visible now')
|
||||
home_1.home_button.click()
|
||||
home_1.add_contact(public_key_user_2)
|
||||
|
||||
device_1.just_fyi('Device2 creates 1-1 chat Group chats once again')
|
||||
home_2.home_button.click()
|
||||
home_2.get_chat_from_home_view(username_1).click()
|
||||
one_to_one_device_2.send_message(message_from_sender)
|
||||
one_to_one_device_2.home_button.click()
|
||||
home_2.create_group_chat([username_1], group_chat_name=GroupChat2Name)
|
||||
|
||||
device_1.just_fyi('Device1 verifies 1-1 chat Group chats are visible')
|
||||
|
||||
home_1.home_button.click()
|
||||
if not home_1.element_by_text_part(username_2).is_element_displayed() or not home_1.element_by_text_part(GroupChat2Name).is_element_displayed():
|
||||
self.errors.append("Chats are not present on Chats view while they have to!")
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
@ -57,13 +57,13 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
||||
sending_amount = wallet_view.get_unique_amount()
|
||||
asset = 'STT'
|
||||
wallet_view.accounts_status_account.click_until_presence_of_element(wallet_view.send_transaction_button)
|
||||
initial_amount_STT = wallet_view.get_asset_amount_by_name('STT')
|
||||
wallet_view.send_transaction(asset_name=asset, amount=sending_amount, recipient=recipient,
|
||||
sign_transaction=True, keycard=True)
|
||||
sign_in_view.toggle_airplane_mode()
|
||||
self.network_api.wait_for_confirmation_of_transaction(basic_user['address'], sending_amount, confirmations=6, token=True)
|
||||
|
||||
sign_in_view.just_fyi('Change that balance is updated and transaction is appeared in history')
|
||||
initial_amount_STT = wallet_view.get_asset_amount_by_name('STT')
|
||||
|
||||
sign_in_view.toggle_airplane_mode()
|
||||
wallet_view.wait_balance_is_changed('STT', initial_amount_STT)
|
||||
|
@ -191,6 +191,8 @@ class ProfileView(BaseView):
|
||||
|
||||
# Privacy and security
|
||||
self.privacy_and_security_button = Button(self.driver, accessibility_id="privacy-and-security-settings-button")
|
||||
self.accept_new_chats_from = Button(self.driver, accessibility_id="accept-new-chats-from")
|
||||
self.accept_new_chats_from_contacts_only = Button(self.driver, translation_id="contacts")
|
||||
# Appearance
|
||||
self.appearance_button = Button(self.driver, accessibility_id="appearance-settings-button")
|
||||
self.show_profile_pictures_of = Button(self.driver, accessibility_id="show-profile-pictures")
|
||||
|
Loading…
x
Reference in New Issue
Block a user