fixed 19 e2e and skipped 3 e2e

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-06-28 16:36:24 +02:00
parent 4f6e06bf59
commit 0c644705b3
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
11 changed files with 170 additions and 119 deletions

View File

@ -88,8 +88,9 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
chat.get_back_to_home_view()
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.receive_transaction_button.click()
# wallet.set_up_wallet()
wallet.accounts_status_account.click()
wallet.receive_transaction_button.click_until_presence_of_element(wallet.send_transaction_request)
address = wallet.address_text.text
wallet.address_text.long_press_element()
wallet.copy_text()
@ -142,19 +143,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
home.share_via_messenger()
home.find_text_part("Get Status at http://status.im")
@marks.testrail_id(5429)
@marks.medium
def test_set_currency(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
profile_view = sign_in_view.profile_button.click()
profile_view.set_currency('Euro (EUR)')
profile_view.get_back_to_home_view()
wallet_view = profile_view.wallet_button.click()
wallet_view.set_up_wallet()
if not wallet_view.find_text_part('EUR'):
pytest.fail('EUR currency is not displayed')
@marks.testrail_id(5431)
@marks.medium
def test_add_custom_network(self):
@ -473,7 +461,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
group_chat_name = 'group-%s' % device_1_home.get_public_chat_name()
profile_picture_before_sync = 'sauce_logo.png'
profile_picture_after_sync = 'sauce_logo_red.png'
username_after_sync = 'username_after_sync'
# username_after_sync = 'username_after_sync'
message_after_sync = 'sent after sync'
# device 1: join public chat, create group chat, edit user picture
@ -504,8 +492,8 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
pytest.fail('Public chat "%s" doesn\'t appear after initial sync'% public_chat_before_sync_name)
device_2_home.profile_button.click()
device_2_profile.contacts_button.scroll_to_element(9, 'up')
if not device_2_profile.element_by_text(username_before_sync).is_element_displayed():
pytest.fail('Profile username was not updated after initial sync')
# if not device_2_profile.element_by_text(username_before_sync).is_element_displayed():
# pytest.fail('Profile username was not updated after initial sync')
device_2_profile.swipe_down()
if not device_2_profile.profile_picture.is_element_image_equals_template(profile_picture_before_sync):
pytest.fail('Profile picture was not updated after initial sync')
@ -520,11 +508,12 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
device_1_group_chat.back_button.click()
device_1_profile = device_1_home.profile_button.click()
device_1_profile.edit_profile_picture(profile_picture_after_sync)
device_1_profile.edit_profile_username(username_after_sync)
# device_1_profile.edit_profile_username(username_after_sync)
# device 2: check that message in group chat is shown, profile details and public chats are synced
if not device_2_profile.element_by_text(username_after_sync).is_element_displayed():
pytest.fail('Profile username was not updated after changing when devices are paired')
# TODO:disabled because editing custom name is not a feature anymore
# if not device_2_profile.element_by_text(username_after_sync).is_element_displayed():
# pytest.fail('Profile username was not updated after changing when devices are paired')
device_2_profile.swipe_down()
if not device_2_profile.profile_picture.is_element_image_equals_template(profile_picture_after_sync):
pytest.fail('Profile picture was not updated after changing when devices are paired')

View File

@ -12,6 +12,7 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5335)
@marks.high
@marks.skip
def test_wallet_set_up(self):
sign_in = SignInView(self.driver)
sign_in.create_user()
@ -65,7 +66,8 @@ class TestWalletManagement(SingleDeviceTestCase):
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(user['passphrase'])
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
wallet_view.accounts_status_account.click()
transactions_view = wallet_view.transaction_history_button.click()
transaction_details = transactions_view.transactions_table.transaction_by_index(0).click()
transaction_hash = transaction_details.get_transaction_hash()
@ -124,9 +126,10 @@ class TestWalletManagement(SingleDeviceTestCase):
profile = sign_in.profile_button.click()
profile.switch_network('Mainnet with upstream RPC')
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
# wallet.set_up_wallet()
asset_name = 'CryptoKitties'
wallet.select_asset(asset_name)
wallet.accounts_status_account.click()
send_transaction = wallet.send_transaction_button.click()
send_transaction.select_asset_button.click()
if send_transaction.asset_by_name(asset_name).is_element_displayed():
@ -138,7 +141,8 @@ class TestWalletManagement(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
sign_in.create_user()
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
# wallet.set_up_wallet()
wallet.accounts_status_account.click()
send_transaction = wallet.send_transaction_button.click()
send_transaction.chose_recipient_button.click()
send_transaction.scan_qr_code_button.click()
@ -151,13 +155,14 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5435)
@marks.medium
@marks.skip
def test_filter_transactions_history(self):
user = wallet_users['C']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(passphrase=user['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
wallet_view.accounts_status_account.click()
transaction_history = wallet_view.transaction_history_button.click()
transaction_history.filters_button.click()
for filter_name in 'Outgoing', 'Pending', 'Failed':
@ -202,6 +207,9 @@ class TestWalletManagement(SingleDeviceTestCase):
profile.switch_network('Rinkeby with upstream RPC')
profile = home_view.profile_button.click()
wallet_view = profile.wallet_button.click()
wallet_view.set_up_wallet()
if wallet_view.collectible_amount_by_name('kdo') != '1':
self.driver.fail('User collectibles amount does not match!')
# wallet_view.set_up_wallet()
wallet_view.collectibles_button.click()
if not wallet_view.element_by_text('KDO').is_element_displayed():
self.driver.fail('User collectibles token name in not shown')
if not wallet_view.element_by_text('1').is_element_displayed():
self.driver.fail('User collectibles amount does not match')

View File

@ -280,6 +280,10 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
message_before_block_1, message_before_block_2 = "Before block from %s" % device_1.driver.number, "Before block from %s" % device_2.driver.number
message_after_block_2 = "After block from %s" % device_2.driver.number
home_1, home_2 = device_1.create_user(username=username_1), device_2.recover_access(basic_user['passphrase'])
profile_1 = home_1.profile_button.click()
default_username_1 = profile_1.default_username_text.text
home_1 = profile_1.get_back_to_home_view()
# device 1, device 2: join to public chat and send several messages
chat_name = device_1.get_public_chat_name()
@ -298,7 +302,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
chat_1.chat_message_input.send_keys(message_before_block_1)
chat_1.send_message_button.click()
chat_2 = home_2.get_chat_with_user(username_1).click()
chat_2 = home_2.get_chat_with_user(default_username_1).click()
for _ in range(2):
chat_2.chat_message_input.send_keys(message_before_block_2)
chat_2.send_message_button.click()
@ -348,7 +352,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
chat_public_2.chat_message_input.send_keys(message_after_block_2)
chat_public_2.send_message_button.click()
home_2 = chat_public_2.get_back_to_home_view()
chat_2 = home_2.get_chat_with_user(username_1).click()
chat_2 = home_2.get_chat_with_user(default_username_1).click()
for _ in range(2):
chat_2.chat_message_input.send_keys(message_after_block_2)
chat_2.send_message_button.click()

View File

@ -220,7 +220,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
home_view.home_button.click()
self.network_api.get_donate(sender_address)
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
home_view.home_button.click()
home_view.add_contact(recipient['public_key'])
chat_view = home_view.get_chat_view()
@ -312,7 +312,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
home_1 = device_1.recover_access(passphrase=sender['passphrase'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'])
wallet_1 = home_1.wallet_button.click()
wallet_1.set_up_wallet()
# wallet_1.set_up_wallet()
wallet_1.home_button.click()
chat_1 = home_1.add_contact(recipient['public_key'])
@ -369,7 +369,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
home = sign_in.recover_access(passphrase=sender['passphrase'])
wallet = home.wallet_button.click()
wallet.set_up_wallet()
# wallet.set_up_wallet()
wallet.home_button.click()
chat = home.add_contact(recipient['public_key'])
@ -381,8 +381,8 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
send_transaction_view = chat.get_send_transaction_view()
chat.send_message_button.click_until_presence_of_element(send_transaction_view.sign_transaction_button)
if not send_transaction_view.element_by_text(recipient['username']).is_element_displayed():
self.errors.append('Recipient name is not shown')
# if not send_transaction_view.element_by_text(recipient['username']).is_element_displayed():
# self.errors.append('Recipient name is not shown')
if not send_transaction_view.element_by_text('ETHro').is_element_displayed():
self.errors.append("Asset field doesn't contain 'ETHro' text")
if not send_transaction_view.element_by_text(amount).is_element_displayed():
@ -396,7 +396,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
home = sign_in.recover_access(passphrase=sender['passphrase'])
wallet = home.wallet_button.click()
wallet.set_up_wallet()
# wallet.set_up_wallet()
wallet.home_button.click()
chat = home.add_contact(basic_user['public_key'])
amount = chat.get_unique_amount()
@ -411,7 +411,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
home_view = wallet_view.home_button.click()
chat_view = home_view.add_contact(basic_user['public_key'])
chat_view.commands_button.click()
@ -423,7 +423,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
error_text = send_transaction.element_by_text('Insufficient funds')
if not error_text.is_element_displayed():
self.errors.append("'Insufficient funds' error is now shown when sending 1 ETH from chat with balance 0")
send_transaction.cross_icon.click()
send_transaction.cancel_button.click()
chat_view.commands_button.click()
# enable STT in wallet
@ -446,7 +446,8 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
wallet_view.accounts_status_account.click()
eth_value = wallet_view.get_eth_value()
stt_value = wallet_view.get_stt_value()
if eth_value == 0 or stt_value == 0:
@ -464,7 +465,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
self.errors.append(
"'Insufficient funds' error is now shown when sending %s ETHro from chat with balance %s" % (
round(eth_value + 1), eth_value))
send_transaction.cross_icon.click()
send_transaction.cancel_button.click()
chat_view.commands_button.click()
chat_view.send_command.click()
chat_view.asset_by_name('STT').scroll_to_element()

View File

@ -241,8 +241,12 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
# device 2: check that removed user can see that he is removed
user2_left_chat_system_message_for_user_2 = return_left_chat_system_message(device_2_custom_username)
if not device_2_chat.chat_element_by_text(user2_left_chat_system_message_for_user_2).is_element_displayed():
self.errors.append("Message with test '%s' was not received" % user2_left_chat_system_message_for_user_2)
# TODO: should be reworked after https://github.com/status-im/status-react/pull/8487: replaced with default username
# if not device_1_chat.chat_element_by_text(user2_left_chat_system_message_for_user_2).is_element_displayed():
# self.errors.append("Message with text '%s' was not received" % user2_left_chat_system_message_for_user_2)
# if not device_2_chat.chat_element_by_text(user2_left_chat_system_message_for_user_2).is_element_displayed():
# self.errors.append("Message with text '%s' was not received" % user2_left_chat_system_message_for_user_2)
# device 2: check there is no message input so user can't send new message in group chat
if device_2_chat.chat_message_input.is_element_displayed():
@ -280,9 +284,10 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
options.make_admin_button.click()
# device 2: check presence of system message
user2_made_admin_system_message_for_user_2 = return_made_admin_system_message(device_2_custom_username)
if not device_2_chat.chat_element_by_text(user2_made_admin_system_message_for_user_2).is_element_displayed():
self.errors.append("Message with test '%s' was not received" % user2_made_admin_system_message_for_user_2)
# TODO: should be reworked after https://github.com/status-im/status-react/pull/8487: replaced with default username
# user2_made_admin_system_message_for_user_2 = return_made_admin_system_message(device_2_custom_username)
# if not device_2_chat.chat_element_by_text(user2_made_admin_system_message_for_user_2).is_element_displayed():
# self.errors.append("Message with test '%s' was not received" % user2_made_admin_system_message_for_user_2)
# device 2: check that as admin can add new members to group chat
device_2_chat.add_members_to_group_chat([chat_member['username']])

View File

@ -117,6 +117,9 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
username_1 = 'user_%s' % get_current_time()
device_1_home, device_2_home = device_1.create_user(username=username_1), device_2.create_user()
profile_1 = device_1_home.profile_button.click()
default_username_1 = profile_1.default_username_text.text
device_1_home = profile_1.get_back_to_home_view()
profile_1 = device_1_home.profile_button.click()
file_name = 'sauce_logo.png'
@ -131,15 +134,15 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_1_chat.chat_message_input.send_keys(message)
device_1_chat.send_message_button.click()
chat_element = device_2_home.get_chat_with_user(username_1)
chat_element = device_2_home.get_chat_with_user(default_username_1)
chat_element.wait_for_visibility_of_element()
device_2_chat = chat_element.click()
if not device_2_chat.chat_element_by_text(message).is_element_displayed():
self.errors.append("Message with test '%s' was not received" % message)
if not device_2_chat.add_to_contacts.is_element_displayed():
self.errors.append('Add to contacts button is not shown')
if device_2_chat.user_name_text.text != username_1:
self.errors.append("Real username '%s' is not shown in one-to-one chat" % username_1)
if device_2_chat.user_name_text.text != default_username_1:
self.errors.append("Default username '%s' is not shown in one-to-one chat" % default_username_1)
device_2_chat.chat_options.click()
device_2_chat.view_profile_button.click()
if not device_2_chat.contact_profile_picture.is_element_image_equals_template(file_name):
@ -201,6 +204,9 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
username_1, username_2 = 'user_1', 'user_2'
home_1, home_2 = device_1.create_user(username=username_1), device_2.create_user(username=username_2)
profile_1 = home_1.profile_button.click()
default_username_1 = profile_1.default_username_text.text
home_1 = profile_1.get_back_to_home_view()
public_key_2 = home_2.get_public_key()
home_2.home_button.click()
@ -209,7 +215,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_1.chat_message_input.send_keys(url_message)
chat_1.send_message_button.click()
chat_1.get_back_to_home_view()
chat_2 = home_2.get_chat_with_user(username_1).click()
chat_2 = home_2.get_chat_with_user(default_username_1).click()
chat_2.element_starts_with_text(url_message, 'button').click()
web_view = chat_2.open_in_status_button.click()
try:
@ -318,6 +324,9 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
username_2 = 'user_%s' % get_current_time()
device_1_home, device_2_home = sign_in_1.create_user(), sign_in_2.create_user(username=username_2)
profile_2 = device_2_home.profile_button.click()
default_username_2 = profile_2.default_username_text.text
device_2_home = profile_2.get_back_to_home_view()
device_1_public_key = device_1_home.get_public_key()
device_1_home.home_button.click()
@ -327,20 +336,20 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_2_chat.chat_message_input.send_keys('*%s*' % bold_text)
device_2_chat.send_message_button.click()
if not device_2_chat.chat_element_by_text(bold_text).is_element_displayed():
self.errors.append('Bold text is not displayed in 1-1 chat for the sender')
self.errors.append('Bold text is not displayed in 1-1 chat for the sender \n')
device_1_chat = device_1_home.get_chat_with_user(username_2).click()
device_1_chat = device_1_home.get_chat_with_user(default_username_2).click()
if not device_1_chat.chat_element_by_text(bold_text).is_element_displayed():
self.errors.append('Bold text is not displayed in 1-1 chat for the recipient')
self.errors.append('Bold text is not displayed in 1-1 chat for the recipient \n')
italic_text = 'italic text'
device_2_chat.chat_message_input.send_keys('~%s~' % italic_text)
device_2_chat.chat_message_input.send_keys('_%s_' % italic_text)
device_2_chat.send_message_button.click()
if not device_2_chat.chat_element_by_text(italic_text).is_element_displayed():
self.errors.append('Italic text is not displayed in 1-1 chat for the sender')
self.errors.append('Italic text is not displayed in 1-1 chat for the sender \n')
if not device_1_chat.chat_element_by_text(italic_text).is_element_displayed():
self.errors.append('Italic text is not displayed in 1-1 chat for the recipient')
self.errors.append('Italic text is not displayed in 1-1 chat for the recipient \n')
device_1_chat.get_back_to_home_view()
device_2_chat.get_back_to_home_view()
@ -356,7 +365,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
if not device_1_chat.chat_element_by_text(bold_text).is_element_displayed():
self.errors.append('Bold text is not displayed in public chat for the recipient')
device_2_chat.chat_message_input.send_keys('~%s~' % italic_text)
device_2_chat.chat_message_input.send_keys('_%s_' % italic_text)
device_2_chat.send_message_button.click()
if not device_2_chat.chat_element_by_text(italic_text).is_element_displayed():
self.errors.append('Italic text is not displayed in public chat for the sender')
@ -433,17 +442,17 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
# changing currency for both devices
for device in devices:
profile_view = device['home_view'].profile_button.click()
profile_view.set_currency(device['currency'])
profile_view.get_back_to_home_view()
wallet_view = device['home_view'].wallet_button.click()
wallet_view.set_currency(device['currency'])
wallet_view.get_back_to_home_view()
device1 = devices[0]
device2 = devices[1]
# setting up device1 wallet
wallet1 = device1['home_view'].wallet_button.click()
wallet1.set_up_wallet()
wallet1.get_back_to_home_view()
# wallet1 = device1['home_view'].wallet_button.click()
# wallet1.set_up_wallet()
# wallet1.get_back_to_home_view()
# sending ETH to device2 in 1*1 chat
device1_chat = device1['home_view'].add_contact(recipient['public_key'])
@ -459,24 +468,25 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
if not received_message.is_element_displayed() and not received_message.contains_text(device2['currency']):
self.errors.append('Wrong currency fiat value while receiving ETH in 1*1 chat.')
device1_chat.get_back_to_home_view()
wallet1 = device1['home_view'].wallet_button.click()
send_amount = device1_chat.get_unique_amount()
# Currently disabled because sending / requesting funds from wallet is not shown in chat
# device1_chat.get_back_to_home_view()
# wallet1 = device1['home_view'].wallet_button.click()
# send_amount = device1_chat.get_unique_amount()
# Send and request some ETH from wallet and check whether the fiat currency value of
# the new messages is equal to user-selected
wallet1.send_transaction(asset_name='ETHro', recipient=recipient['username'], amount=send_amount)
wallet1.get_back_to_home_view()
device1_chat = device1['home_view'].get_chat_with_user(recipient['username']).click()
sent_message = device1_chat.chat_element_by_text(send_amount)
received_message = device2_chat.chat_element_by_text(send_amount)
if not sent_message.is_element_displayed() and not sent_message.contains_text(device1['currency']):
self.errors.append('Wrong currency fiat value while sending ETH from wallet.')
if not received_message.is_element_displayed() and not sent_message.contains_text(device2['currency']):
self.errors.append('Wrong currency fiat value while receiving ETH sent via wallet.')
# wallet1.send_transaction(asset_name='ETHro', recipient=recipient['username'], amount=send_amount)
# wallet1.get_back_to_home_view()
# device1_chat = device1['home_view'].get_chat_with_user(recipient['username']).click()
#
# sent_message = device1_chat.chat_element_by_text(send_amount)
# received_message = device2_chat.chat_element_by_text(send_amount)
#
# if not sent_message.is_element_displayed() and not sent_message.contains_text(device1['currency']):
# self.errors.append('Wrong currency fiat value while sending ETH from wallet.')
#
# if not received_message.is_element_displayed() and not sent_message.contains_text(device2['currency']):
# self.errors.append('Wrong currency fiat value while receiving ETH sent via wallet.')
self.verify_no_errors()
@ -578,7 +588,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
sigin_view = SignInView(self.driver)
home_view = sigin_view.recover_access(sender_passphrase)
wallet = home_view.wallet_button.click()
wallet.set_up_wallet()
# wallet.set_up_wallet()
wallet.get_back_to_home_view()
@ -600,9 +610,9 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
chat.get_back_to_home_view()
# Switch default currency to user-selected
profile_view = sigin_view.profile_button.click()
profile_view.set_currency(user_currency)
profile_view.get_back_to_home_view()
wallet_view = sigin_view.wallet_button.click()
wallet_view.set_currency(user_currency)
wallet_view.get_back_to_home_view()
chat = home_view.get_chat_with_user(recipient_user_name).click()
@ -629,26 +639,30 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
if not request_message.is_element_displayed() and not request_message.contains_text(user_currency):
self.errors.append('Wrong fiat value while requesting assets in 1-1 chat with user selected currency.')
chat.get_back_to_home_view()
# disabled since after merge https://github.com/status-im/status-react/pull/8425 no messages are shown
# in 1-1 chat after sending from wallet
wallet = home_view.wallet_button.click()
send_amount, request_amount = [chat.get_unique_amount() for _ in range(2)]
# chat.get_back_to_home_view()
#
# wallet = home_view.wallet_button.click()
# send_amount, request_amount = [chat.get_unique_amount() for _ in range(2)]
# Send and request some tokens from wallet and check whether the fiat currency value of
# the new messages is equal to user-selected
wallet.send_transaction(asset_name='STT', recipient=recipient_user_name, amount=send_amount)
wallet.receive_transaction(asset_name='STT', recipient=recipient_user_name, amount=request_amount)
wallet.get_back_to_home_view()
chat = home_view.get_chat_with_user(recipient_user_name).click()
send_message = chat.chat_element_by_text(send_amount)
if not send_message.is_element_displayed() and not send_message.contains_text(user_currency):
self.errors.append('Wrong fiat value while sending assets from wallet with user selected currency.')
request_message = chat.chat_element_by_text(request_amount)
if not request_message.is_element_displayed() and not request_message.contains_text(user_currency):
self.errors.append('Wrong fiat value while requesting assets from wallet with user selected currency.')
#
# wallet.send_transaction(asset_name='STT', recipient=recipient_user_name, amount=send_amount)
# wallet.receive_transaction(asset_name='STT', recipient=recipient_user_name, amount=request_amount)
#
# wallet.get_back_to_home_view()
# chat = home_view.get_chat_with_user(recipient_user_name).click()
#
# send_message = chat.chat_element_by_text(send_amount)
# if not send_message.is_element_displayed() and not send_message.contains_text(user_currency):
# self.errors.append('Wrong fiat value while sending assets from wallet with user selected currency.')
#
# request_message = chat.chat_element_by_text(request_amount)
# if not request_message.is_element_displayed() and not request_message.contains_text(user_currency):
# self.errors.append('Wrong fiat value while requesting assets from wallet with user selected currency.')
self.verify_no_errors()

View File

@ -70,7 +70,7 @@ class TestBrowsing(SingleDeviceTestCase):
daap_view = home_view.dapp_tab_button.click()
browsing_view = daap_view.open_url('google.com')
browsing_view.cross_icon.click()
browser_entry = daap_view.get_browser_entry('Google')
browser_entry = daap_view.get_browser_entry('Google').scroll_to_element()
browser_entry.swipe_and_delete()
home_view.relogin()
if browser_entry.is_element_present(20):

View File

@ -268,11 +268,11 @@ class TestTransactionDApp(SingleDeviceTestCase):
format('sending one transaction in batch with big gas '
'limit and price (no funds to pay gas)'))
send_transaction_view.transaction_fee_button.click()
send_transaction_view.network_fee_button.click()
gas_price = '999.9'
send_transaction_view.gas_price_input.clear()
send_transaction_view.gas_price_input.set_value(gas_price)
send_transaction_view.total_fee_input.click()
send_transaction_view.update_fee_button.click()
send_transaction_view.done_button.click()
# Check whether sending a tx in batch with normal gas limit and price does not trigger the warning
@ -379,7 +379,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
send_transaction_view.sign_transaction()
if not wallet.send_transaction_button.is_element_displayed():
self.errors.append('Could not sing the transaction!')
self.errors.append('Could not sign the transaction!')
self.verify_no_errors()

View File

@ -100,7 +100,8 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
sign_in_view.recover_access(sender['passphrase'])
home_view = sign_in_view.get_home_view()
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
wallet_view.accounts_status_account.click()
send_transaction = wallet_view.send_transaction_button.click()
send_transaction.amount_edit_box.click()
transaction_amount = send_transaction.get_unique_amount()
@ -312,6 +313,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
stt_value = wallet_view.get_stt_value()
if eth_value == 0 or stt_value == 0:
pytest.fail('No funds!')
wallet_view.accounts_status_account.click()
send_transaction = wallet_view.send_transaction_button.click()
send_transaction.amount_edit_box.set_value(round(eth_value + 1))
error_text = send_transaction.element_by_text('Insufficient funds')
@ -386,7 +388,8 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
signin_view = SignInView(self.driver)
home_view = signin_view.recover_access(passphrase=passphrase)
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
# wallet_view.set_up_wallet()
wallet_view.accounts_status_account.click()
transaction_view = wallet_view.transaction_history_button.click()
status_tx_number = transaction_view.transactions_table.get_transactions_number()
@ -414,11 +417,23 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
self.verify_no_errors()
@marks.testrail_id(5429)
@marks.medium
def test_set_currency(self):
sign_in_view = SignInView(self.driver)
user_currency = 'Euro (EUR)'
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_currency(user_currency)
if not wallet_view.find_text_part('EUR'):
pytest.fail('EUR currency is not displayed')
@marks.transaction
class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(5378)
@marks.skip
@marks.high
def test_transaction_message_sending_from_wallet(self):
recipient = transaction_recipients['E']
@ -453,3 +468,4 @@ class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
if not chat_2.chat_element_by_text(amount).is_element_displayed():
self.errors.append('Transaction message is not shown in 1-1 chat for the recipient')
self.verify_no_errors()

View File

@ -620,14 +620,6 @@ class ProfileView(BaseView):
self.logout_button.click()
return self.logout_dialog.logout_button.click()
def set_currency(self, desired_currency='EUR'):
"""
:param desired_currency: defines a currency designator which is expressed by ISO 4217 code
"""
self.main_currency_button.click()
desired_currency = self.element_by_text_part(desired_currency)
desired_currency.scroll_to_element()
desired_currency.click()
def mail_server_by_name(self, server_name):
return MailServerElement(self.driver, server_name)

View File

@ -43,7 +43,7 @@ class EthAssetText(BaseText):
class STTAssetText(BaseText):
def __init__(self, driver):
super(STTAssetText, self).__init__(driver)
self.locator = self.Locator.accessibility_id("//*[@text='STT']/preceding-sibling::*[1]")
self.locator = self.Locator.xpath_selector("//*[@text='STT']/preceding-sibling::*[1]")
class UsdTotalValueText(BaseText):
@ -98,6 +98,11 @@ class SetUpButton(BaseButton):
super(SetUpButton, self).__init__(driver)
self.locator = self.Locator.text_selector("Lets get set up")
class SetCurrencyButton(BaseButton):
def __init__(self, driver):
super(SetCurrencyButton, self).__init__(driver)
self.locator = self.Locator.text_selector("Set currency")
class SignInPhraseText(BaseText):
def __init__(self, driver):
@ -149,6 +154,11 @@ class CurrencyText(BaseText):
super(CurrencyText, self).__init__(driver)
self.locator = self.Locator.accessibility_id('total-amount-currency-text')
class CollectiblesButton(BaseButton):
def __init__(self, driver):
super(CollectiblesButton, self).__init__(driver)
self.locator = self.Locator.text_selector('Collectibles')
class BackupRecoveryPhrase(BaseButton):
def __init__(self, driver):
@ -233,6 +243,8 @@ class WalletView(BaseView):
# elements for multiaccount
self.accounts_more_options = AccountsMoreOptions(self.driver)
self.accounts_status_account = AccountsStatusAccount(self.driver)
self.collectibles_button = CollectiblesButton(self.driver)
self.set_currency_button = SetCurrencyButton(self.driver)
def get_usd_total_value(self):
import re
@ -359,3 +371,13 @@ class WalletView(BaseView):
elm = CollectibleTextElement(self.driver, name)
elm.scroll_to_element()
return elm.text
def set_currency(self, desired_currency='EUR'):
"""
:param desired_currency: defines a currency designator which is expressed by ISO 4217 code
"""
self.accounts_more_options.click()
self.set_currency_button.click()
desired_currency = self.element_by_text_part(desired_currency)
desired_currency.scroll_to_element()
desired_currency.click()