Added unique users for transactions tests

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Anton Danchenko 2018-09-17 11:50:01 +03:00 committed by Serhy
parent 3b1c3bae21
commit 1ceebe703a
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
19 changed files with 393 additions and 289 deletions

View File

@ -19,6 +19,7 @@ RERUN_ERRORS = [
"HTTP Error 303",
"http.client.RemoteDisconnected: Remote end closed connection without response",
"[Errno 110] Connection timed out"
"replacement transaction underpriced"
]

View File

@ -25,135 +25,6 @@ def debug(text: str):
test_suite_data = TestSuiteData()
basic_user = dict()
basic_user['password'] = "newuniquepassword12"
basic_user['passphrase'] = "tree weekend ceiling awkward universe pyramid glimpse raven pair lounge grant grief"
basic_user['username'] = "Little Weighty Iberianmole"
basic_user['public_key'] = "0x040d3400f0ba80b2f6017a9021a66e042abc33cf7051ddf98a24a815c93d6c052ce2b7873d799f096325" \
"9f41c5a1bf08133dd4f3fe63ea1cceaa1e86ebc4bc42c9"
transaction_users = dict()
transaction_users['A_USER'] = dict()
transaction_users['A_USER']['password'] = "qwerty"
transaction_users['A_USER']['passphrase'] = "heavy earn fence pool drift balcony act coast stairs basic juice hip"
transaction_users['A_USER']['username'] = "Simplistic Personal Isabellinewheatear"
transaction_users['A_USER']['address'] = "c8f8b3376814d0dfe61e4b9eaf7970697c24f6b2"
transaction_users['A_USER']['public_key'] = "0x042bb1943a6516510ecb57356f1dbeeaf928e3260b4d0b8e81e1e139ab9e4be75" \
"185086bedb27992d554d6e7782515e4c00d022b89d46ea5c208f0e5003c7286a4"
transaction_users['B_USER'] = dict()
transaction_users['B_USER']['password'] = "qwerty"
transaction_users['B_USER']['passphrase'] = "subway size dial screen stomach route skin kitchen radar true coffee six"
transaction_users['B_USER']['username'] = "Unselfish Thrifty Racer"
transaction_users['B_USER']['address'] = "85b159bad0d500483b307ec6892c7fa3be591cbc"
transaction_users['B_USER']['public_key'] = "0x04d25784aec35405a870dba2e44e02103bc6a258fe9fa8580bb1da4deeedf8827" \
"baa3c44def9a4685a7db7a1d30c46d3ca9e7ef46a6ca9037a59791e2b0eca04fd"
transaction_users['C_USER'] = dict()
transaction_users['C_USER']['password'] = "qwerty"
transaction_users['C_USER']['passphrase'] = "potato labor object reward minor casino dismiss size flame task winter report"
transaction_users['C_USER']['username'] = "Magnificent Earnest Bandicoot"
transaction_users['C_USER']['address'] = "549b9bcd069d720390a6819ff8b3d9dd252fa3be"
transaction_users['C_USER']['public_key'] = "0x04099019246c7a54e581dcb68d0d78969a76a8753c588a62f2e7f0e1c28f88e574d" \
"ae7d9cd6db9cdc6318714b2aa2945e1be8e1a5cf0f1f876b0c0627f8c6bfdb4"
transaction_users['D_USER'] = dict()
transaction_users['D_USER']['password'] = "qwerty"
transaction_users['D_USER']['passphrase'] = "weekend unable empty crime blind rhythm crunch answer travel coast silly like"
transaction_users['D_USER']['username'] = "Warped Murky Avocet"
transaction_users['D_USER']['address'] = "616874dc6cc2810cdc930dea26496fcf217d58ca"
transaction_users['D_USER']['public_key'] = "0x049191be3d0b0258732a4c3bd66d2e68cf7e536a0a975fd501a3265cba9ff5f7c78" \
"f51345417e42f56e16926b685f99448ac05b9608b0d42cf65ee58853f104696"
transaction_users['E_USER'] = dict()
transaction_users['E_USER']['password'] = "newuniquepassword12"
transaction_users['E_USER']['passphrase'] = "sea ill guard bounce gesture tomato walnut fitness plastic affair oven transfer"
transaction_users['E_USER']['username'] = "Chartreuse Comfortable Spadefoot"
transaction_users['E_USER']['address'] = "f7cb60839c0de25e37be0391c33bb34a8f0f8414"
transaction_users['E_USER']['public_key'] = "0x04d27bda317be9b3d943db5e098b3ab1c19ac8156d706f1d237c000e2ea0f553eec" \
"09499522623dc686f5d0a3233c7f1f9724849127cedb5511945e12ca3b4d297"
transaction_users['F_USER'] = dict()
transaction_users['F_USER']['password'] = "newuniquepassword12"
transaction_users['F_USER']['passphrase'] = "style case lazy pole general section dawn royal slice evoke crowd boat"
transaction_users['F_USER']['username'] = "Happygolucky Zigzag Stoat"
transaction_users['F_USER']['address'] = "a94a2a7584620677d290549a96046e59a18f09ef"
transaction_users['F_USER']['public_key'] = "0x042edc34542022b2017a8e9bbdbd7535fb4bdf98a5474edbe7179c4782dbe902704" \
"380f4d7146a2f8e432dfb6fead596057782ae96fba82c3541cc67884e3a9224"
transaction_users['G_USER'] = dict()
transaction_users['G_USER']['password'] = "qwerty"
transaction_users['G_USER']['passphrase'] = "load other time gadget fury sudden gossip hurry entry curtain jaguar inflict"
transaction_users['G_USER']['username'] = "Unsung Yearly Amethystgemclam"
transaction_users['G_USER']['address'] = "876c331d60aedd175ca78cb6a50eaeb9681a1868"
transaction_users['G_USER']['public_key'] = "0x04e70078c562b4a65f08e57cc336e8cbd66d27f411324158807654ae82ef16d8f0f" \
"583454ba2c98a2451a9a990ec3efc874dd845d8ba72a49fb9fb0454d0bd6bab"
transaction_users['H_USER'] = dict()
transaction_users['H_USER']['password'] = 'qwerty'
transaction_users['H_USER']['passphrase'] = "age three camp tip jump radio copper merry mention top panther motor"
transaction_users['H_USER']['username'] = "Lawngreen Rich Silverfox"
transaction_users['H_USER']['address'] = "762d87f77c88048281ddad78501fcfe0700f08ce"
transaction_users['H_USER']['public_key'] = "0x040ff9ff7c1fd9d325a0762bf36fdd6efce0190a02bba4367afc99f0313404a5a3ed" \
"f74aa54ebf7221561e0d83728b4f7934b28809d69ba9e7434fc2fe9d4b9bd4"
transaction_users_wallet = dict()
transaction_users_wallet['A_USER'] = dict()
transaction_users_wallet['A_USER']['password'] = "new_unique_password"
transaction_users_wallet['A_USER']['passphrase'] = "six runway asthma blur secret rebuild parent logic horror decline rib buyer"
transaction_users_wallet['A_USER']['username'] = "Leading Practical Paradiseflycatcher"
transaction_users_wallet['A_USER']['address'] = "0887afe0ee3e1b195f596350bb04bba034514af9"
transaction_users_wallet['A_USER']['public_key'] = "0x04026c389530328076016ebcdc3f8e558e2e9e6e6c015adb1a668783ca1b11" \
"34260afe392967434cdbdf616138cbadcd009642edd62a5275ad0bc2ff460849fb74"
transaction_users_wallet['B_USER'] = dict()
transaction_users_wallet['B_USER']['password'] = "new_unique_password"
transaction_users_wallet['B_USER']['passphrase'] = "shrug dring breeze marcy install net reopen uniform atom guilt sadness elite"
transaction_users_wallet['B_USER']['username'] = "Blank Bowed Chrysomelid"
transaction_users_wallet['B_USER']['address'] = "13b36abe0be8fa607ab5ec755f2719e545705490"
transaction_users_wallet['B_USER']['public_key'] = "0x04e9299758f894d45d2515b254799cdfbe823d387f46896a52ec12e8f37f771" \
"fba9fb49a44f93198e581651be71132f68d6d7cca6d1d9c801edbbaab58641b5dc4"
transaction_users_wallet['C_USER'] = dict()
transaction_users_wallet['C_USER']['password'] = "new_unique_password"
transaction_users_wallet['C_USER']['passphrase'] = "purchase ensure mistake crystal person similar shaft family shield clog risk market"
transaction_users_wallet['C_USER']['username'] = "Official Scratchy Bernesemountaindog"
transaction_users_wallet['C_USER']['address'] = "8dce052ccda2f6f6b555759cee6957e04a6ddf5b"
transaction_users_wallet['C_USER']['public_key'] = "0x04fd6db8ae245ca351cb6e24bea29df6d81cb35b7f7a91c68a8b5a0c49da444" \
"8cdb356cc9c24b9d813094a86e1fb2dc2bf5252a3f117194bbb3bb29f4befbe898c"
transaction_users_wallet['D_USER'] = dict()
transaction_users_wallet['D_USER']['password'] = "new_unique_password"
transaction_users_wallet['D_USER']['passphrase'] = "night grit town donate length zoo meat collect vapor brush topic check"
transaction_users_wallet['D_USER']['username'] = "Joyful Complete Crow"
transaction_users_wallet['D_USER']['address'] = "1fc705a336a0a2e48eb3c953ce577e591f2767ad"
transaction_users_wallet['D_USER']['public_key'] = "0x04b785a16763a8f9a139ea53c2da4dc976a40e3ca288aaff52e3e9527d19150" \
"21ea6dda3083f37bc5c6a160028faf16dc9d7f684ed59473830fe422700abf826ea"
group_chat_users = dict()
group_chat_users['A_USER'] = dict()
group_chat_users['A_USER']['password'] = "qwerty"
group_chat_users['A_USER']['passphrase'] = "thank fruit brisk pond opera census grid husband claw sight chunk arena"
group_chat_users['A_USER']['username'] = "Astonishing Low Johndory"
group_chat_users['A_USER']['public_key'] = "0x047c67e698c27527e4cac58a3e67103f4fe59849287171464088b321f1c323ac4bfbb54" \
"c87a3f27179be7404cb840f90f92edddb36bcf1bc3d462c79a2d73566f7"
group_chat_users['B_USER'] = dict()
group_chat_users['B_USER']['password'] = "qwerty"
group_chat_users['B_USER']['passphrase'] = "label ill slender audit atom love vote snap edit program climb beyond"
group_chat_users['B_USER']['username'] = "Milky Major Albatross"
group_chat_users['B_USER']['public_key'] = "0x04b5457d527c337083a2d0c0295492239ff98f577875049d4d09cefbe5af3b76c18c48d" \
"312aafb788b2b9922249819932bbc570a738e5c3b49d5e84ebcdec247cb"
group_chat_users['C_USER'] = dict()
group_chat_users['C_USER']['password'] = "qwerty"
group_chat_users['C_USER']['passphrase'] = "you salmon ticket antique spray panther flee neck scale mad trial exile"
group_chat_users['C_USER']['username'] = "Optimistic Gigantic Bagworm"
group_chat_users['C_USER']['public_key'] = "0x04dcdb5cac266328c41bdb0e33a266544a4ac1f2655a68170e5fe4452baff1a413a1d40" \
"3dba7e295445505ee55ea03ee99cb7d26bee05e6b486a9bdaaf6be73a0b"
common_password = 'qwerty'
unique_password = 'unique' + get_current_time()

View File

@ -1,7 +1,8 @@
import pytest
from tests import marks, group_chat_users, basic_user, bootnode_address, mailserver_address, camera_access_error_text, \
from tests import marks, bootnode_address, mailserver_address, camera_access_error_text, \
photos_access_error_text
from tests.users import transaction_senders, basic_user
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from views.sign_in_view import SignInView
@ -59,7 +60,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile_view.copy_text()
profile_view.cross_icon.click()
home = profile_view.home_button.click()
chat = home.add_contact(group_chat_users['A_USER']['public_key'])
chat = home.add_contact(transaction_senders['M']['public_key'])
chat.chat_message_input.click()
chat.paste_text()
input_text = chat.chat_message_input.text
@ -76,7 +77,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
wallet.copy_text()
wallet.get_back_to_home_view()
wallet.home_button.click()
home.get_chat_with_user(group_chat_users['A_USER']['username']).click()
home.get_chat_with_user(transaction_senders['M']['username']).click()
chat.chat_message_input.click()
chat.paste_text()
if chat.chat_message_input.text != address:
@ -108,7 +109,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
self.errors.append('Profile button counter is not shown after re-login')
sign_in_view.profile_button.click()
profile_view.backup_recovery_phrase()
if sign_in_view.profile_button.counter.is_element_displayed():
if sign_in_view.profile_button.counter.is_element_displayed(60):
self.errors.append('Profile button counter is shown after seed phrase backup')
self.verify_no_errors()
@ -144,7 +145,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile_view.advanced_button.click()
profile_view.find_text_part('CUSTOM_ROPSTEN')
@marks.logcat
@marks.testrail_id(3774)
def test_logcat_backup_recovery_phrase(self):
sign_in_view = SignInView(self.driver)

View File

@ -1,7 +1,8 @@
import pytest
from tests import marks, common_password, basic_user
from tests import marks, unique_password
from tests.base_test_case import SingleDeviceTestCase
from tests.users import basic_user
from views.sign_in_view import SignInView
@ -25,7 +26,7 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
address = wallet.get_wallet_address()
self.driver.reset()
sign_in.accept_agreements()
sign_in.recover_access(passphrase=' '.join(recovery_phrase.values()), password=common_password)
sign_in.recover_access(passphrase=' '.join(recovery_phrase.values()))
home.connection_status.wait_for_invisibility_of_element(30)
home.wallet_button.click()
wallet.set_up_wallet()
@ -50,7 +51,7 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
self.driver.reset()
sign_in.accept_agreements()
sign_in.recover_access(passphrase=' '.join(list(recovery_phrase.values())[::-1]), password=common_password)
sign_in.recover_access(passphrase=' '.join(list(recovery_phrase.values())[::-1]))
if sign_in.get_public_key() == public_key:
pytest.fail('The same account is recovered with reversed passphrase')
@ -58,5 +59,5 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(3769)
def test_logcat_recovering_account(self):
sign_in = SignInView(self.driver)
sign_in.recover_access(basic_user['passphrase'], basic_user['password'])
sign_in.check_no_values_in_logcat(passphrase=basic_user['passphrase'], password=basic_user['password'])
sign_in.recover_access(passphrase=basic_user['passphrase'], password=unique_password)
sign_in.check_no_values_in_logcat(passphrase=basic_user['passphrase'], password=unique_password)

View File

@ -1,7 +1,8 @@
import pytest
from tests import marks, transaction_users, camera_access_error_text, common_password, transaction_users_wallet
from tests import marks, camera_access_error_text
from tests.base_test_case import SingleDeviceTestCase
from tests.users import wallet_users
from views.sign_in_view import SignInView
@ -41,9 +42,9 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(1449)
def test_open_transaction_on_etherscan(self):
user = transaction_users['A_USER']
user = wallet_users['A']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(user['passphrase'], user['password'])
home_view = sign_in_view.recover_access(user['passphrase'])
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
transactions_view = wallet_view.transaction_history_button.click()
@ -57,9 +58,9 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(1450)
def test_copy_transaction_hash(self):
user = transaction_users['A_USER']
user = wallet_users['A']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(user['passphrase'], user['password'])
home_view = sign_in_view.recover_access(user['passphrase'])
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
transactions_view = wallet_view.transaction_history_button.click()
@ -151,9 +152,9 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(3730)
def test_filter_transactions_history(self):
user = transaction_users_wallet['C_USER']
user = wallet_users['C']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(passphrase=user['passphrase'], password=user['password'])
sign_in_view.recover_access(passphrase=user['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()

View File

@ -1,7 +1,8 @@
import pytest
from tests import marks, transaction_users
from tests import marks
from tests.base_test_case import SingleDeviceTestCase
from tests.users import wallet_users
from views.sign_in_view import SignInView
@ -10,9 +11,9 @@ class TestWalletModal(SingleDeviceTestCase):
@marks.testrail_id(3794)
def test_wallet_modal_public_chat(self):
user = transaction_users['A_USER']
user = wallet_users['A']
sign_in = SignInView(self.driver)
sign_in.recover_access(user['passphrase'], user['password'])
sign_in.recover_access(user['passphrase'])
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
usd_value = wallet.get_usd_total_value()
@ -36,9 +37,9 @@ class TestWalletModal(SingleDeviceTestCase):
@marks.testrail_id(3795)
def test_wallet_modal_dapp(self):
user = transaction_users['B_USER']
user = wallet_users['B']
sign_in = SignInView(self.driver)
sign_in.recover_access(user['passphrase'], user['password'])
sign_in.recover_access(user['passphrase'])
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
usd_value = wallet.get_usd_total_value()
@ -65,9 +66,9 @@ class TestWalletModal(SingleDeviceTestCase):
@marks.testrail_id(3797)
def test_wallet_modal_transaction_history(self):
user = transaction_users['B_USER']
user = wallet_users['B']
sign_in = SignInView(self.driver)
home = sign_in.recover_access(user['passphrase'], user['password'])
home = sign_in.recover_access(user['passphrase'])
start_new_chat = home.plus_button.click()
start_new_chat.open_d_app_button.click()
start_new_chat.element_by_text('Airswap').click()
@ -80,9 +81,9 @@ class TestWalletModal(SingleDeviceTestCase):
@marks.testrail_id(3800)
def test_close_and_open_wallet_modal(self):
user = transaction_users['B_USER']
user = wallet_users['B']
sign_in = SignInView(self.driver)
home = sign_in.recover_access(user['passphrase'], user['password'])
home = sign_in.recover_access(user['passphrase'])
start_new_chat = home.plus_button.click()
start_new_chat.open_d_app_button.click()
start_new_chat.element_by_text('Airswap').click()

View File

@ -1,7 +1,8 @@
import pytest
import time
from tests import marks, group_chat_users, basic_user, camera_access_error_text
from tests import marks, camera_access_error_text
from tests.users import basic_user
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from views.sign_in_view import SignInView
@ -30,16 +31,16 @@ class TestChatManagement(SingleDeviceTestCase):
def test_swipe_to_delete_1_1_chat(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(group_chat_users['A_USER']['public_key'])
chat = home.add_contact(basic_user['public_key'])
chat.chat_message_input.send_keys('test message')
chat.send_message_button.click()
chat.get_back_to_home_view()
home.get_chat_with_user(group_chat_users['A_USER']['username']).swipe_and_delete()
home.get_chat_with_user(basic_user['username']).swipe_and_delete()
self.driver.close_app()
self.driver.launch_app()
sign_in.accept_agreements()
sign_in.sign_in()
if home.get_chat_with_user(group_chat_users['A_USER']['username']).is_element_displayed():
if home.get_chat_with_user(basic_user['username']).is_element_displayed():
pytest.fail('Deleted 1-1 chat is present after relaunch app')
@marks.testrail_id(3718)
@ -69,7 +70,7 @@ class TestChatManagement(SingleDeviceTestCase):
def test_add_contact_by_pasting_public_key(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
public_key = group_chat_users['A_USER']['public_key']
public_key = basic_user['public_key']
chat = home.join_public_chat(home.get_public_chat_name())
chat.chat_message_input.send_keys(public_key)
@ -87,7 +88,7 @@ class TestChatManagement(SingleDeviceTestCase):
start_new_chat.get_back_to_home_view()
home.plus_button.click()
start_new_chat.start_new_chat_button.click()
if not start_new_chat.element_by_text(group_chat_users['A_USER']['username']).is_element_displayed():
if not start_new_chat.element_by_text(basic_user['username']).is_element_displayed():
pytest.fail("List of contacts doesn't contain added user")
@marks.testrail_id(3719)
@ -128,7 +129,7 @@ class TestChatManagement(SingleDeviceTestCase):
home = sign_in.create_user()
start_new_chat = home.plus_button.click()
start_new_chat.start_new_chat_button.click()
start_new_chat.public_key_edit_box.set_value(group_chat_users['B_USER']['public_key'][:-1])
start_new_chat.public_key_edit_box.set_value(basic_user['public_key'][:-1])
start_new_chat.confirm()
warning_text = start_new_chat.element_by_text('Please enter or scan a valid contact code or username')
if not warning_text.is_element_displayed():

View File

@ -3,7 +3,8 @@ from _pytest.outcomes import Failed
from decimal import Decimal as d
from selenium.common.exceptions import TimeoutException
from tests import marks, transaction_users, common_password, group_chat_users, transaction_users_wallet, unique_password
from tests import marks, unique_password
from tests.users import transaction_senders, basic_user, transaction_recipients
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
from views.sign_in_view import SignInView
@ -15,10 +16,10 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.smoke_1
@marks.testrail_id(3697)
def test_network_mismatch_for_send_request_commands(self):
sender = self.senders['d_user'] = transaction_users['D_USER']
sender = transaction_senders['D']
self.create_drivers(2)
device_1_sign_in, device_2_sign_in = SignInView(self.drivers[0]), SignInView(self.drivers[1])
device_1_sign_in.recover_access(passphrase=sender['passphrase'], password=sender['password'])
device_1_sign_in.recover_access(passphrase=sender['passphrase'])
device_2_sign_in.create_user()
device_1_home, device_2_home = device_1_sign_in.get_home_view(), device_2_sign_in.get_home_view()
@ -29,7 +30,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
device_1_chat = device_1_home.add_contact(public_key)
amount_1 = device_1_chat.get_unique_amount()
device_1_chat.send_transaction_in_1_1_chat('ETH', amount_1, common_password, wallet_set_up=True)
device_1_chat.send_transaction_in_1_1_chat('ETH', amount_1, wallet_set_up=True)
device_1_chat.chat_element_by_text(amount_1).progress_bar.wait_for_invisibility_of_element()
status_text_1 = device_1_chat.chat_element_by_text(amount_1).status.text
if status_text_1 != 'Sent':
@ -72,12 +73,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(765)
@marks.smoke_1
def test_send_eth_in_1_1_chat(self):
recipient = transaction_users['D_USER']
sender = self.senders['c_user'] = transaction_users['C_USER']
recipient = transaction_recipients['A']
sender = transaction_senders['A']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
home_1 = device_1.recover_access(passphrase=sender['passphrase'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'])
wallet_1, wallet_2 = home_1.wallet_button.click(), home_2.wallet_button.click()
wallet_1.set_up_wallet()
wallet_1.home_button.click()
@ -119,7 +120,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
if send_transaction_view.total_fee_input.text != '%s ETH' % (d(gas_limit) * d(gas_price) / d(1000000000)):
self.errors.append('Gas limit and/or gas price fields were not edited')
send_transaction_view.done_button.click()
send_transaction_view.sign_transaction(sender['password'])
send_transaction_view.sign_transaction()
if not chat_1.chat_element_by_text(amount).is_element_displayed():
self.errors.append('Message with the sent amount is not shown for the sender')
@ -139,12 +140,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(1391)
@marks.smoke_1
def test_request_and_receive_eth_in_1_1_chat(self):
recipient = transaction_users['C_USER']
sender = self.senders['d_user'] = transaction_users['D_USER']
recipient = transaction_recipients['B']
sender = transaction_senders['J']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
home_1 = device_1.recover_access(passphrase=sender['passphrase'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'])
wallet_1, wallet_2 = home_1.wallet_button.click(), home_2.wallet_button.click()
wallet_1.set_up_wallet()
wallet_1.home_button.click()
@ -157,7 +158,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
chat_2.request_transaction_in_1_1_chat('ETH', amount)
chat_1 = home_1.get_chat_with_user(recipient['username']).click()
chat_1.send_funds_to_request(amount=amount, sender_password=sender['password'])
chat_1.send_funds_to_request(amount=amount)
if not chat_1.chat_element_by_text(amount).is_element_displayed():
self.errors.append('Message with the sent amount is not shown for the sender')
@ -179,12 +180,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
username_1 = 'user_1'
recipient = group_chat_users['C_USER']
sender = transaction_senders['O']
home_1 = device_1.create_user(username=username_1)
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
home_2 = device_2.recover_access(passphrase=sender['passphrase'])
home_1.add_contact(recipient['public_key'])
home_1.add_contact(sender['public_key'])
home_1.get_back_to_home_view()
wallet_1 = home_1.wallet_button.click()
wallet_1.set_up_wallet()
@ -197,7 +198,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
send_transaction_device_1.amount_edit_box.set_value(amount)
send_transaction_device_1.confirm()
send_transaction_device_1.chose_recipient_button.click()
sender_button = send_transaction_device_1.element_by_text(recipient['username'])
sender_button = send_transaction_device_1.element_by_text(sender['username'])
send_transaction_device_1.recent_recipients_button.click_until_presence_of_element(sender_button)
sender_button.click()
wallet_1.send_request_button.click()
@ -217,7 +218,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(1417)
def test_contact_profile_send_transaction(self):
self.create_drivers(1)
recipient = transaction_users['B_USER']
recipient = basic_user
sign_in_view = SignInView(self.drivers[0])
sign_in_view.create_user()
home_view = sign_in_view.get_home_view()
@ -239,25 +240,25 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
chat_view.send_as_keyevent(amount)
chat_view.send_message_button.click()
send_transaction_view = chat_view.get_send_transaction_view()
send_transaction_view.sign_transaction(common_password)
send_transaction_view.sign_transaction()
self.network_api.find_transaction_by_unique_amount(recipient['address'], amount)
@marks.testrail_id(3744)
@marks.smoke_1
def test_send_tokens_in_1_1_chat(self):
recipient = transaction_users['D_USER']
sender = transaction_users['C_USER']
recipient = transaction_recipients['C']
sender = transaction_senders['C']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
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.home_button.click()
chat_1 = home_1.add_contact(recipient['public_key'])
amount = chat_1.get_unique_amount()
chat_1.send_transaction_in_1_1_chat('STT', amount, sender['password'])
chat_1.send_transaction_in_1_1_chat('STT', amount)
message_1 = chat_1.chat_element_by_text(amount)
if not message_1.is_element_displayed() or not message_1.contains_text('STT'):
@ -276,12 +277,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(3748)
@marks.smoke_1
def test_request_and_receive_tokens_in_1_1_chat(self):
recipient = transaction_users['C_USER']
sender = transaction_users['D_USER']
recipient = transaction_recipients['D']
sender = transaction_senders['B']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
home_1 = device_1.recover_access(passphrase=sender['passphrase'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'])
wallet_1, wallet_2 = home_1.wallet_button.click(), home_2.wallet_button.click()
wallet_1.set_up_wallet()
wallet_1.home_button.click()
@ -293,7 +294,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
chat_2.request_transaction_in_1_1_chat('STT', amount)
chat_1 = home_1.get_chat_with_user(recipient['username']).click()
chat_1.send_funds_to_request(amount=amount, sender_password=sender['password'])
chat_1.send_funds_to_request(amount=amount)
message_1 = chat_1.chat_element_by_text(amount)
if not message_1.is_element_displayed() or not message_1.contains_text('STT'):
@ -311,19 +312,19 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(3749)
@marks.smoke_1
def test_transaction_confirmed_on_recipient_side(self):
recipient = transaction_users['D_USER']
sender = transaction_users['C_USER']
recipient = transaction_recipients['E']
sender = transaction_senders['E']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
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.home_button.click()
chat_1 = home_1.add_contact(recipient['public_key'])
amount = chat_1.get_unique_amount()
chat_1.send_transaction_in_1_1_chat('ETH', amount, sender['password'])
chat_1.send_transaction_in_1_1_chat('ETH', amount)
chat_2 = home_2.get_chat_with_user(sender['username']).click()
self.network_api.wait_for_confirmation_of_transaction(recipient['address'], amount)
@ -340,7 +341,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
def test_send_request_not_enabled_tokens(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(transaction_users['D_USER']['public_key'])
chat = home.add_contact(basic_user['public_key'])
chat.commands_button.click()
chat.send_command.click()
if chat.asset_by_name('MDS').is_element_displayed():
@ -355,13 +356,13 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
@marks.logcat
@marks.testrail_id(3771)
def test_logcat_send_transaction_in_1_1_chat(self):
sender = transaction_users['C_USER']
sender = transaction_senders['F']
sign_in = SignInView(self.driver)
home = sign_in.recover_access(passphrase=sender['passphrase'], password=unique_password)
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.home_button.click()
chat = home.add_contact(transaction_users['D_USER']['public_key'])
chat = home.add_contact(basic_user['public_key'])
amount = chat.get_unique_amount()
chat.send_transaction_in_1_1_chat('ETH', amount, unique_password)
chat.check_no_values_in_logcat(password=unique_password)
@ -369,10 +370,10 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
@marks.testrail_id(3736)
@marks.smoke_1
def test_send_transaction_details_in_1_1_chat(self):
recipient = transaction_users['D_USER']
sender = transaction_users['C_USER']
recipient = basic_user
sender = transaction_senders['G']
sign_in = SignInView(self.driver)
home = sign_in.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home = sign_in.recover_access(passphrase=sender['passphrase'])
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.home_button.click()
@ -399,15 +400,15 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
@marks.testrail_id(3750)
@marks.smoke_1
def test_transaction_confirmed_on_sender_side(self):
sender = transaction_users['D_USER']
sender = transaction_senders['H']
sign_in = SignInView(self.driver)
home = sign_in.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home = sign_in.recover_access(passphrase=sender['passphrase'])
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.home_button.click()
chat = home.add_contact(transaction_users['C_USER']['public_key'])
chat = home.add_contact(basic_user['public_key'])
amount = chat.get_unique_amount()
chat.send_transaction_in_1_1_chat('ETH', amount, sender['password'])
chat.send_transaction_in_1_1_chat('ETH', amount)
self.network_api.wait_for_confirmation_of_transaction(sender['address'], amount)
if not chat.chat_element_by_text(amount).contains_text('Confirmed', wait_time=90):
pytest.fail('Status "Confirmed" is not shown under transaction for the sender')
@ -419,7 +420,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
home_view = wallet_view.home_button.click()
chat_view = home_view.add_contact(transaction_users['H_USER']['public_key'])
chat_view = home_view.add_contact(basic_user['public_key'])
chat_view.commands_button.click()
chat_view.send_command.click()
chat_view.asset_by_name('ETH').click()
@ -441,9 +442,9 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
@marks.testrail_id(3793)
def test_insufficient_funds_1_1_chat_positive_balance(self):
sender = transaction_users_wallet['A_USER']
sender = transaction_senders['I']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
eth_value = wallet_view.get_eth_value()
@ -451,7 +452,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
if eth_value == 0 or stt_value == 0:
pytest.fail('No funds!')
home_view = wallet_view.home_button.click()
chat_view = home_view.add_contact(transaction_users['H_USER']['public_key'])
chat_view = home_view.add_contact(basic_user['public_key'])
chat_view.commands_button.click()
chat_view.send_command.click()
chat_view.asset_by_name('ETH').click()

View File

@ -4,7 +4,8 @@ import string
import emoji
from datetime import datetime
from selenium.common.exceptions import TimeoutException
from tests import marks, get_current_time, group_chat_users
from tests import marks, get_current_time
from tests.users import transaction_senders
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
from views.sign_in_view import SignInView
@ -236,7 +237,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
if home_view.connection_status.text != 'Offline':
self.errors.append('Offline status is not shown in home screen')
chat = home_view.add_contact(group_chat_users['C_USER']['public_key'])
chat = home_view.add_contact(transaction_senders['C']['public_key'])
if chat.connection_status.text != 'Offline':
self.errors.append('Offline status is not shown in 1-1 chat')
chat.get_back_to_home_view()
@ -431,7 +432,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
self.errors.append('Message text was not copied in a public chat')
chat.get_back_to_home_view()
home.add_contact(group_chat_users['A_USER']['public_key'])
home.add_contact(transaction_senders['M']['public_key'])
message_input.send_keys(message_text)
chat.send_message_button.click()
@ -448,7 +449,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
def test_delete_cut_and_paste_messages(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(group_chat_users['B_USER']['public_key'])
chat = home.add_contact(transaction_senders['N']['public_key'])
message_text = 'test'
message_input = chat.chat_message_input
@ -483,7 +484,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
self.errors.append('Message with emoji was not sent in public chat')
chat.get_back_to_home_view()
home.add_contact(group_chat_users['C_USER']['public_key'])
home.add_contact(transaction_senders['O']['public_key'])
chat.chat_message_input.send_keys(emoji.emojize(emoji_name))
chat.send_message_button.click()

View File

@ -1,6 +1,7 @@
import pytest
from tests import marks, basic_user
from tests import marks
from tests.base_test_case import SingleDeviceTestCase
from tests.users import basic_user
from views.sign_in_view import SignInView
@ -24,7 +25,7 @@ class TestDApps(SingleDeviceTestCase):
def test_request_public_key_status_test_daap(self):
user = basic_user
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(passphrase=user['passphrase'], password=user['password'])
sign_in_view.recover_access(passphrase=user['passphrase'])
status_test_dapp = sign_in_view.open_status_test_dapp()
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.status_api_button.click()

View File

@ -1,7 +1,8 @@
import pytest
from tests import transaction_users, marks, unique_password
from tests import marks, unique_password
from tests.base_test_case import SingleDeviceTestCase
from tests.users import transaction_senders
from views.sign_in_view import SignInView
@ -10,10 +11,10 @@ class TestTransactionDApp(SingleDeviceTestCase):
@marks.testrail_id(769)
@marks.smoke_1
def test_send_transaction_from_daap(self):
sender = transaction_users['B_USER']
sender = transaction_senders['K']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
address = transaction_users['B_USER']['address']
sign_in_view.recover_access(sender['passphrase'])
address = sender['address']
initial_balance = self.network_api.get_balance(address)
status_test_dapp = sign_in_view.open_status_test_dapp()
status_test_dapp.wait_for_d_aap_to_load()
@ -22,7 +23,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
wallet_view = send_transaction_view.get_wallet_view()
wallet_view.done_button.click()
wallet_view.yes_button.click()
send_transaction_view.sign_transaction(sender['password'])
send_transaction_view.sign_transaction()
self.network_api.verify_balance_is_updated(initial_balance, address)
@marks.testrail_id(3716)
@ -44,16 +45,16 @@ class TestTransactionDApp(SingleDeviceTestCase):
@marks.testrail_id(3696)
@marks.smoke_1
def test_deploy_contract_from_daap(self):
sender = transaction_users['E_USER']
sender = transaction_senders['L']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
status_test_dapp = sign_in_view.open_status_test_dapp()
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.transactions_button.click()
send_transaction_view = status_test_dapp.deploy_contract_button.click()
send_transaction_view.sign_transaction(sender['password'])
send_transaction_view.sign_transaction()
for text in 'Contract deployed at: ', 'Call contract get function', \
'Call contract set function', 'Call function 2 times in a row':
if not status_test_dapp.element_by_text(text).is_element_displayed(120):
@ -62,7 +63,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
@marks.logcat
@marks.testrail_id(3772)
def test_logcat_send_transaction_from_daap(self):
sender = transaction_users['B_USER']
sender = transaction_senders['M']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], unique_password)
wallet_view = sign_in_view.wallet_button.click()

View File

@ -2,8 +2,9 @@ import random
import pytest
from tests import transaction_users, transaction_users_wallet, marks, common_password, unique_password
from tests import marks, unique_password, common_password
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from tests.users import transaction_senders, basic_user, wallet_users, transaction_recipients
from views.sign_in_view import SignInView
@ -13,10 +14,10 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(766)
@marks.smoke_1
def test_send_eth_from_wallet_to_contact(self):
recipient = transaction_users['F_USER']
sender = transaction_users['E_USER']
recipient = basic_user
sender = transaction_senders['N']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
home_view = sign_in_view.get_home_view()
home_view.add_contact(recipient['public_key'])
home_view.get_back_to_home_view()
@ -32,16 +33,16 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
recent_recipient = send_transaction.element_by_text(recipient['username'])
send_transaction.recent_recipients_button.click_until_presence_of_element(recent_recipient)
recent_recipient.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount)
@marks.testrail_id(767)
@marks.smoke_1
def test_send_eth_from_wallet_to_address(self):
recipient = transaction_users['E_USER']
sender = transaction_users['F_USER']
recipient = basic_user
sender = transaction_senders['P']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(sender['passphrase'], sender['password'])
home_view = sign_in_view.recover_access(sender['passphrase'])
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
send_transaction = wallet_view.send_transaction_button.click()
@ -53,16 +54,16 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount)
@marks.testrail_id(1430)
@marks.smoke_1
def test_send_stt_from_wallet(self):
sender = transaction_users_wallet['A_USER']
recipient = transaction_users_wallet['B_USER']
recipient = basic_user
sender = transaction_senders['Q']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
home_view = sign_in_view.get_home_view()
home_view.add_contact(recipient['public_key'])
home_view.get_back_to_home_view()
@ -80,15 +81,15 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(recipient['address'], amount, token=True)
@marks.testrail_id(2164)
def test_transaction_wrong_password_wallet(self):
recipient = transaction_users['E_USER']
sender = transaction_users['F_USER']
recipient = basic_user
sender = wallet_users['A']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
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()
@ -109,7 +110,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(1452)
def test_transaction_appears_in_history(self):
recipient = transaction_users['B_USER']
recipient = basic_user
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
home_view = sign_in_view.get_home_view()
@ -129,17 +130,17 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction(common_password)
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(recipient['address'], transaction_amount)
transactions_view = wallet_view.transaction_history_button.click()
transactions_view.transactions_table.find_transaction(amount=transaction_amount)
@marks.testrail_id(2163)
def test_send_eth_from_wallet_incorrect_address(self):
recipient = transaction_users['E_USER']
sender = transaction_users['F_USER']
recipient = basic_user
sender = wallet_users['B']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
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()
@ -157,8 +158,8 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.logcat
@marks.testrail_id(3770)
def test_logcat_send_transaction_from_wallet(self):
sender = transaction_users['E_USER']
recipient = transaction_users['F_USER']
sender = transaction_senders['R']
recipient = basic_user
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], unique_password)
home_view = sign_in_view.get_home_view()
@ -179,10 +180,10 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(3746)
@marks.smoke_1
def test_send_token_with_7_decimals(self):
sender = transaction_users_wallet['A_USER']
recipient = transaction_users_wallet['B_USER']
sender = transaction_senders['S']
recipient = basic_user
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
home_view = sign_in_view.get_home_view()
home_view.add_contact(recipient['public_key'])
home_view.get_back_to_home_view()
@ -200,15 +201,15 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(recipient['address'], amount, token=True, decimals=7)
@marks.testrail_id(3747)
@marks.smoke_1
def test_token_with_more_than_allowed_decimals(self):
sender = transaction_users_wallet['A_USER']
sender = wallet_users['C']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
send_transaction = wallet_view.send_transaction_button.click()
@ -234,9 +235,9 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(1405)
def test_send_valid_amount_after_insufficient_funds_error(self):
sender = transaction_users['G_USER']
sender = transaction_senders['T']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
bigger_amount = wallet_view.get_eth_value() + 1
@ -252,9 +253,9 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.confirm()
send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(transaction_users['H_USER']['address'])
send_transaction.enter_recipient_address_input.set_value(basic_user['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(sender['address'], valid_amount)
@marks.testrail_id(3764)
@ -277,9 +278,9 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(3792)
def test_insufficient_funds_wallet_positive_balance(self):
sender = transaction_users_wallet['A_USER']
sender = wallet_users['A']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
eth_value = wallet_view.get_eth_value()
@ -305,9 +306,9 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(3728)
def test_modify_transaction_fee_values(self):
sender = transaction_users['H_USER']
sender = transaction_senders['U']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
sign_in_view.recover_access(sender['passphrase'])
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
send_transaction = wallet_view.send_transaction_button.click()
@ -317,7 +318,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.confirm()
send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click()
recipient_address = transaction_users['G_USER']['address']
recipient_address = basic_user['address']
send_transaction.enter_recipient_address_input.set_value(recipient_address)
send_transaction.done_button.click()
send_transaction.advanced_button.click()
@ -329,7 +330,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.total_fee_input.click()
send_transaction.done_button.click()
send_transaction.sign_transaction_button.click_until_presence_of_element(send_transaction.enter_password_input)
send_transaction.enter_password_input.send_keys(sender['password'])
send_transaction.enter_password_input.send_keys(common_password)
send_transaction.sign_transaction_button.click()
send_transaction.element_by_text('intrinsic gas too low').wait_for_visibility_of_element()
send_transaction.ok_button.click()
@ -352,7 +353,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.gas_price_input.set_value(gas_price)
send_transaction.total_fee_input.click()
send_transaction.done_button.click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
self.network_api.find_transaction_by_unique_amount(sender['address'], amount)
@ -362,12 +363,12 @@ class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(3761)
@marks.smoke_1
def test_transaction_message_sending_from_wallet(self):
recipient = transaction_users['D_USER']
sender = transaction_users['C_USER']
recipient = transaction_recipients['E']
sender = transaction_senders['V']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.recover_access(passphrase=sender['passphrase'], password=sender['password'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'], password=recipient['password'])
home_1 = device_1.recover_access(passphrase=sender['passphrase'])
home_2 = device_2.recover_access(passphrase=recipient['passphrase'])
chat_1 = home_1.add_contact(recipient['public_key'])
chat_1.get_back_to_home_view()
@ -382,7 +383,7 @@ class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
send_transaction.chose_recipient_button.click()
send_transaction.recent_recipients_button.click()
send_transaction.element_by_text_part(recipient['username']).click()
send_transaction.sign_transaction(sender['password'])
send_transaction.sign_transaction()
wallet_1.home_button.click()
home_1.get_chat_with_user(recipient['username']).click()

View File

@ -238,15 +238,7 @@ environment = LocalMultipleDeviceTestCase if pytest.config.getoption('env') == '
class MultipleDeviceTestCase(environment):
def setup_method(self, method):
super(MultipleDeviceTestCase, self).setup_method(method)
self.senders = dict()
def teardown_method(self, method):
for user in self.senders:
self.network_api.faucet(address=self.senders[user]['address'])
super(MultipleDeviceTestCase, self).teardown_method(method)
pass
class MessageReliabilityTestCase(MultipleDeviceTestCase):

View File

@ -1,4 +1,3 @@
import time
import requests
import pytest
import re
@ -9,8 +8,10 @@ from datetime import datetime
from os import environ
from io import BytesIO
from sauceclient import SauceClient
from support.api.network_api import NetworkApi
from support.github_report import GithubHtmlReport
from support.testrail_report import TestrailReport
from tests.users import transaction_senders
sauce_username = environ.get('SAUCE_USERNAME')
sauce_access_key = environ.get('SAUCE_ACCESS_KEY')
@ -22,7 +23,6 @@ testrail_report = TestrailReport(sauce_username, sauce_access_key)
def pytest_addoption(parser):
parser.addoption("--build",
action="store",
default=datetime.now().strftime('%Y-%m-%d-%H-%M'),
@ -191,6 +191,13 @@ def pytest_runtest_protocol(item, nextitem):
return True # no need to rerun
@pytest.fixture(scope="session", autouse=True)
def faucet_for_senders():
network_api = NetworkApi()
for user in transaction_senders.values():
network_api.faucet(address=user['address'])
@pytest.fixture
def messages_number():
return int(pytest.config.getoption('messages_number'))

View File

@ -14,8 +14,9 @@ class TestChatBot(SingleDeviceTestCase):
def setup_method(self, method, max_duration=10800):
super(TestChatBot, self).setup_method(method, max_duration=10800)
public_keys = pytest.config.getoption('public_keys').split()
repeats = 24 / len(public_keys)
if pytest.config.getoption('public_keys'):
public_keys = pytest.config.getoption('public_keys').split()
repeats = 24 / len(public_keys)
@pytest.mark.chatbot
@pytest.mark.parametrize('key', numpy.repeat(public_keys, repeats))

220
test/appium/tests/users.py Normal file
View File

@ -0,0 +1,220 @@
basic_user = dict()
basic_user['passphrase'] = "tree weekend ceiling awkward universe pyramid glimpse raven pair lounge grant grief"
basic_user['username'] = "Little Weighty Iberianmole"
basic_user['public_key'] = "0x040d3400f0ba80b2f6017a9021a66e042abc33cf7051ddf98a24a815c93d6c052ce2b7873d799f096325" \
"9f41c5a1bf08133dd4f3fe63ea1cceaa1e86ebc4bc42c9"
basic_user['address'] = "f184747445c3b85ceb147dfb136067cb93d95f1d"
wallet_users = dict()
wallet_users['A'] = dict()
wallet_users['A']['passphrase'] = "heavy earn fence pool drift balcony act coast stairs basic juice hip"
wallet_users['A']['username'] = "Simplistic Personal Isabellinewheatear"
wallet_users['A']['address'] = "c8f8b3376814d0dfe61e4b9eaf7970697c24f6b2"
wallet_users['A']['public_key'] = "0x042bb1943a6516510ecb57356f1dbeeaf928e3260b4d0b8e81e1e139ab9e4be75" \
"185086bedb27992d554d6e7782515e4c00d022b89d46ea5c208f0e5003c7286a4"
wallet_users['B'] = dict()
wallet_users['B']['passphrase'] = "subway size dial screen stomach route skin kitchen radar true coffee six"
wallet_users['B']['username'] = "Unselfish Thrifty Racer"
wallet_users['B']['address'] = "85b159bad0d500483b307ec6892c7fa3be591cbc"
wallet_users['B']['public_key'] = "0x04d25784aec35405a870dba2e44e02103bc6a258fe9fa8580bb1da4deeedf8827" \
"baa3c44def9a4685a7db7a1d30c46d3ca9e7ef46a6ca9037a59791e2b0eca04fd"
wallet_users['C'] = dict()
wallet_users['C']['passphrase'] = "purchase ensure mistake crystal person similar shaft family shield clog risk market"
wallet_users['C']['username'] = "Official Scratchy Bernesemountaindog"
wallet_users['C']['address'] = "8dce052ccda2f6f6b555759cee6957e04a6ddf5b"
wallet_users['C']['public_key'] = "0x04fd6db8ae245ca351cb6e24bea29df6d81cb35b7f7a91c68a8b5a0c49da444" \
"8cdb356cc9c24b9d813094a86e1fb2dc2bf5252a3f117194bbb3bb29f4befbe898c"
transaction_senders = dict()
transaction_senders['A'] = dict()
transaction_senders['A']['passphrase'] = 'night fortune spider version version armed amused winner matter tonight cave flag'
transaction_senders['A']['username'] = 'Limp Different Wildcat'
transaction_senders['A']['address'] = 'efca4fd47b98b9f01c4eef4827e576a01459728a'
transaction_senders['A']['public_key'] = "0x0428cf3af6c5036cf28bcc8b15b135e0d56d488a815bde788e7840a8f8c048e929fc0c6700"\
"71c71d0974b0e7e62760f2284bb0f96e48b6b06abfd2132a0b2a183e"
transaction_senders['B'] = dict()
transaction_senders['B']['passphrase'] = "quality walk globe dune rally distance fragile year turn horror sample lobster"
transaction_senders['B']['username'] = "Overcooked Necessary Acornbarnacle"
transaction_senders['B']['address'] = "a456a6bde144695879a754b19dd13e9f75ea43f2"
transaction_senders['B']['public_key'] = "0x04fe09ed99d92aacf2a96bca59f9e135d19a62331057249000af6a754588160" \
"b01d282b393a7c6d4d39a50099a544a8b0ac4a2140242bff244996e59645423a2e7"
transaction_senders['C'] = dict()
transaction_senders['C']['passphrase'] = "potato labor object reward minor casino dismiss size flame task winter report"
transaction_senders['C']['username'] = "Magnificent Earnest Bandicoot"
transaction_senders['C']['address'] = "549b9bcd069d720390a6819ff8b3d9dd252fa3be"
transaction_senders['C']['public_key'] = "0x04099019246c7a54e581dcb68d0d78969a76a8753c588a62f2e7f0e1c28f88e574d" \
"ae7d9cd6db9cdc6318714b2aa2945e1be8e1a5cf0f1f876b0c0627f8c6bfdb4"
transaction_senders['D'] = dict()
transaction_senders['D']['passphrase'] = "weekend unable empty crime blind rhythm crunch answer travel coast silly like"
transaction_senders['D']['username'] = "Warped Murky Avocet"
transaction_senders['D']['address'] = "616874dc6cc2810cdc930dea26496fcf217d58ca"
transaction_senders['D']['public_key'] = "0x049191be3d0b0258732a4c3bd66d2e68cf7e536a0a975fd501a3265cba9ff5f7c78" \
"f51345417e42f56e16926b685f99448ac05b9608b0d42cf65ee58853f104696"
transaction_senders['E'] = dict()
transaction_senders['E']['passphrase'] = "sea ill guard bounce gesture tomato walnut fitness plastic affair oven transfer"
transaction_senders['E']['username'] = "Chartreuse Comfortable Spadefoot"
transaction_senders['E']['address'] = "f7cb60839c0de25e37be0391c33bb34a8f0f8414"
transaction_senders['E']['public_key'] = "0x04d27bda317be9b3d943db5e098b3ab1c19ac8156d706f1d237c000e2ea0f553eec" \
"09499522623dc686f5d0a3233c7f1f9724849127cedb5511945e12ca3b4d297"
transaction_senders['F'] = dict()
transaction_senders['F']['passphrase'] = "style case lazy pole general section dawn royal slice evoke crowd boat"
transaction_senders['F']['username'] = "Happygolucky Zigzag Stoat"
transaction_senders['F']['address'] = "a94a2a7584620677d290549a96046e59a18f09ef"
transaction_senders['F']['public_key'] = "0x042edc34542022b2017a8e9bbdbd7535fb4bdf98a5474edbe7179c4782dbe902704" \
"380f4d7146a2f8e432dfb6fead596057782ae96fba82c3541cc67884e3a9224"
transaction_senders['G'] = dict()
transaction_senders['G']['passphrase'] = "load other time gadget fury sudden gossip hurry entry curtain jaguar inflict"
transaction_senders['G']['username'] = "Unsung Yearly Amethystgemclam"
transaction_senders['G']['address'] = "876c331d60aedd175ca78cb6a50eaeb9681a1868"
transaction_senders['G']['public_key'] = "0x04e70078c562b4a65f08e57cc336e8cbd66d27f411324158807654ae82ef16d8f0f" \
"583454ba2c98a2451a9a990ec3efc874dd845d8ba72a49fb9fb0454d0bd6bab"
transaction_senders['H'] = dict()
transaction_senders['H']['passphrase'] = "age three camp tip jump radio copper merry mention top panther motor"
transaction_senders['H']['username'] = "Lawngreen Rich Silverfox"
transaction_senders['H']['address'] = "762d87f77c88048281ddad78501fcfe0700f08ce"
transaction_senders['H']['public_key'] = "0x040ff9ff7c1fd9d325a0762bf36fdd6efce0190a02bba4367afc99f0313404a5a3ed" \
"f74aa54ebf7221561e0d83728b4f7934b28809d69ba9e7434fc2fe9d4b9bd4"
transaction_senders['I'] = dict()
transaction_senders['I']['passphrase'] = "six runway asthma blur secret rebuild parent logic horror decline rib buyer"
transaction_senders['I']['username'] = "Leading Practical Paradiseflycatcher"
transaction_senders['I']['address'] = "0887afe0ee3e1b195f596350bb04bba034514af9"
transaction_senders['I']['public_key'] = "0x04026c389530328076016ebcdc3f8e558e2e9e6e6c015adb1a668783ca1b11" \
"34260afe392967434cdbdf616138cbadcd009642edd62a5275ad0bc2ff460849fb74"
transaction_senders['J'] = dict()
transaction_senders['J']['passphrase'] = "shrug during breeze mercy install net reopen uniform atom guilt sadness elite"
transaction_senders['J']['username'] = "Pointed Likely Ringtailedlemur"
transaction_senders['J']['address'] = "ad0f319ca0cfa051f625ad1a3fc6bf0cbad45b24"
transaction_senders['J']['public_key'] = "0x040c96d2428b1dcdf147ce9af8454da7e036317a37472663b3d34c5641561643388" \
"ccbdc867bd8aa0457d9caaec62501859ed515f85f7da4507eb39fde73456b89"
transaction_senders['K'] = dict()
transaction_senders['K']['passphrase'] = "fly west avoid depend tape direct foster off cry crucial blame elegant"
transaction_senders['K']['username'] = "Floralwhite Tan Fruitfly"
transaction_senders['K']['address'] = "6a4dd6e2dcef1139cd04e6a24c19ded819340f85"
transaction_senders['K']['public_key'] = "0x0457a7bb6446275db38326a56bb02acb2432312b0079788d8717440eac8074f9db7c154" \
"9a4a1e409a8741e4f82873fad58568ce838e0597e0a8324b8f8bdb7c8e2"
transaction_senders['L'] = dict()
transaction_senders['L']['passphrase'] = "road rabbit tuna bacon man raccoon equal note cream rescue core chunk"
transaction_senders['L']['username'] = "Winding Incomparable Ape"
transaction_senders['L']['address'] = "002881321fd06d77ba2deed035140631f49506be"
transaction_senders['L']['public_key'] = "0x04e47f4d244d78b71622f3623779758ce4761f635e7f1c0fa53f72383c928d9cdd" \
"4744ffb933f2d5369e2ea7a5be16a0587a99e1c1346a6127966140d088d4c594"
transaction_senders['M'] = dict()
transaction_senders['M']['passphrase'] = "thank fruit brisk pond opera census grid husband claw sight chunk arena"
transaction_senders['M']['username'] = "Astonishing Low Johndory"
transaction_senders['M']['address'] = 'bd4e3eede0f942b843a031007190c08cab373248'
transaction_senders['M']['public_key'] = "0x047c67e698c27527e4cac58a3e67103f4fe59849287171464088b321f1c323ac4bfbb54" \
"c87a3f27179be7404cb840f90f92edddb36bcf1bc3d462c79a2d73566f7"
transaction_senders['N'] = dict()
transaction_senders['N']['passphrase'] = "label ill slender audit atom love vote snap edit program climb beyond"
transaction_senders['N']['username'] = "Milky Major Albatross"
transaction_senders['N']['address'] = 'd117188dbf1c160074cc4850a1d140286fdfc831'
transaction_senders['N']['public_key'] = "0x04b5457d527c337083a2d0c0295492239ff98f577875049d4d09cefbe5af3b76c18c48d" \
"312aafb788b2b9922249819932bbc570a738e5c3b49d5e84ebcdec247cb"
transaction_senders['O'] = dict()
transaction_senders['O']['passphrase'] = "you salmon ticket antique spray panther flee neck scale mad trial exile"
transaction_senders['O']['username'] = "Optimistic Gigantic Bagworm"
transaction_senders['O']['address'] = '45798efe501340efbe265bce950f9ddcad8d7ce5'
transaction_senders['O']['public_key'] = "0x04dcdb5cac266328c41bdb0e33a266544a4ac1f2655a68170e5fe4452baff1a413a1d40" \
"3dba7e295445505ee55ea03ee99cb7d26bee05e6b486a9bdaaf6be73a0b"
transaction_senders['P'] = dict()
transaction_senders['P']['passphrase'] = "warm beach mind real stay oil evil giggle core tilt paddle invest"
transaction_senders['P']['username'] = "Rundown Defensive Woodchuck"
transaction_senders['P']['address'] = "9164f86170290ba3080e37d19d1953d3c5945913"
transaction_senders['P']['public_key'] = "0x04d166306a9a7ae8de5cfbb65004d38287b6a15effa803d9455111ac9db658f"\
"259de2b68aa391909ae82a8d415a720b5e2287da9bb6fe90a2560fd37c3dd046ccc"
transaction_senders['Q'] = dict()
transaction_senders['Q']['passphrase'] = "junior forum symptom twin route scare source cycle extra engage worth prison"
transaction_senders['Q']['username'] = "Acceptable Verifiable Groundhog"
transaction_senders['Q']['address'] = "e9fd13b1bcfff497f21b28e141fa2e5049ebcee4"
transaction_senders['Q']['public_key'] = "0x048f9ea824e39cc958d19368433ebe3c05d8b849b3f7916462044440cfc4d9640f9"\
"411f136c564463f39c5aa4515c32b81bd438016ec0a97299d8e474c89c364b7"
transaction_senders['R'] = dict()
transaction_senders['R']['passphrase'] = "ahead warrior poet radio image topic wasp clever banner angry age quality"
transaction_senders['R']['username'] = "Excited Nimble Eagle"
transaction_senders['R']['address'] = "d54bf6c67e349bf889fd5d411a8c410b3a4cc099"
transaction_senders['R']['public_key'] = "0x04043f644b66a38421106e1eb081b7dc2c69f9394dcd1644f6592e4a3fff23855f8"\
"99d2b82eb8d5af41f8b96138a952857771abc6517dd01f53b30d46669faea40"
transaction_senders['S'] = dict()
transaction_senders['S']['passphrase'] = "tree capable picnic swap venture correct open enforce assault news inform pear"
transaction_senders['S']['username'] = "Gracious Pastel Pear"
transaction_senders['S']['address'] = "061fae3dd75beab5855f584837ca0c0a8e84f5c1"
transaction_senders['S']['public_key'] = "0x045ce599ee338e6a44f74cd80afe566e2fd0961a55b16baa1d2d483634d51"\
"eb7e2d171571c97698809fa67252bb286ad3893e7641edccd9875999476c7c82190b8"
transaction_senders['T'] = dict()
transaction_senders['T']['passphrase'] = "describe adult cat kidney disagree stick timber unaware yellow jungle leave warrior"
transaction_senders['T']['username'] = "Feline Gleaming Galapagoshawk"
transaction_senders['T']['address'] = "7e33ab11ae8ca21e8d3c15ceb74b6cc429834b5b"
transaction_senders['T']['public_key'] = "0x040384d2d766f4078ebaf33caf73e6fc22df8359cc9c80f07aee7c07f763ba182"\
"ac52ae0cfc41d596bffacbc70017f1f6d5bea7960f305c4f3ae13f3a29b564301"
transaction_senders['U'] = dict()
transaction_senders['U']['passphrase'] = "club script position scare face medal already quality company flat item pill"
transaction_senders['U']['username'] = "Handy Unkempt Deer"
transaction_senders['U']['address'] = "b92496fffd668c2de08694623303456aa98cdf33"
transaction_senders['U']['public_key'] = "0x041eaeaab787806f2cc1be9accc10dad9043a3f48c20387e376958130f48309"\
"f4ed90252f93045cff6612071e9deb3647cde601729e03dcaff3b6d0eee28f99426"
transaction_senders['V'] = dict()
transaction_senders['V']['passphrase'] = "true bus equip ensure speed blame universe renew gasp clip glide unaware"
transaction_senders['V']['username'] = "Handsome Breakable Trout"
transaction_senders['V']['address'] = "785acde6058a670e674aa0f66ccbabe98bbce7b1"
transaction_senders['V']['public_key'] = "0x04617c8001fd201c80095eb55ed483c1d3c8abb1f273215a694b3606bbde53460ea1909b"\
"b2c58340afc8e55768fc1cb6a6a91592019bbdeefb75f5caab05c9ed11"
transaction_recipients = dict()
transaction_recipients['A'] = dict()
transaction_recipients['A']['passphrase'] = "lesson pull call also fork credit cycle spray purity force sail hub"
transaction_recipients['A']['username'] = "Forthright Glass Hellbender"
transaction_recipients['A']['address'] = 'd630b1224683a438582e3e14e35ba5e03513eaab'
transaction_recipients['A']['public_key'] = "0x043bde707970fe1db10895ef3dae0749c80b3a541886428f1c75d9996f327b0" \
"bfed4bd8bbdedf4b694566f4ed6717c3b40cc828d509431b641c59e5a8de96240e7"
transaction_recipients['B'] = dict()
transaction_recipients['B']['passphrase'] = "night grit town donate length zoo meat collect vapor brush topic check"
transaction_recipients['B']['username'] = "Joyful Complete Crow"
transaction_recipients['B']['address'] = "1fc705a336a0a2e48eb3c953ce577e591f2767ad"
transaction_recipients['B']['public_key'] = "0x04b785a16763a8f9a139ea53c2da4dc976a40e3ca288aaff52e3e9527d19150" \
"21ea6dda3083f37bc5c6a160028faf16dc9d7f684ed59473830fe422700abf826ea"
transaction_recipients['C'] = dict()
transaction_recipients['C']['passphrase'] = "pig public focus dream mango match use aunt machine potato depend toilet"
transaction_recipients['C']['username'] = "Intelligent Little Silkworm"
transaction_recipients['C']['address'] = "702995aa7dc6aad543661aab35494f4986022659"
transaction_recipients['C']['public_key'] = "0x04ea14d6bec597204b9688aacf99aa6f64474b3e455955a99af7bf1372e2c307782" \
"d2eefcdcc5972457c7e68f892a97caeeab90ab5df54f3e42522869aad9e3a5a"
transaction_recipients['D'] = dict()
transaction_recipients['D']['passphrase'] = "dog smooth myth loud unveil excite chimney cousin rain license cross palm"
transaction_recipients['D']['username'] = "Mild Lively Goat"
transaction_recipients['D']['address'] = "e71c43413559e40ebcb602fb95c33662926cc000"
transaction_recipients['D']['public_key'] = "0x046fa236550b20b3abe73d98ea85214c0fe32ab36288b6f45945ba371fdce9dda1" \
"12b9d08f131f98e2542db46b0fe42f585775e899734ad75e3f49082f6b9ee159"
transaction_recipients['E'] = dict()
transaction_recipients['E']['passphrase'] = "private dial force harsh crunch bottom draw fish image used notable school"
transaction_recipients['E']['username'] = "Likely Darkgreen Iridescentshark"
transaction_recipients['E']['address'] = "5c1d183ca67f651d864a2c88318c05dc0e32f188"
transaction_recipients['E']['public_key'] = "0x043dd70b791b95afabab57e9c68bf94e706927d0907e7cc59e60d3c93e7eb061210" \
"c3556b62bee28337db6636b99fbdfaf7cb3ea0ead63192deae6b4ba48ceeb39"

View File

@ -1,6 +1,8 @@
import time
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from tests import common_password
from views.base_element import BaseButton, BaseEditBox, BaseText
from views.base_view import BaseView, ProgressBar
from views.profile_view import ProfilePictureElement, PublicKeyText
@ -311,7 +313,7 @@ class ChatView(BaseView):
errors.append('Not received messages from user %s: "%s"' % (username, ', '.join(
[i for i in list(set(expected_messages) - set(received_messages))])))
def send_funds_to_request(self, amount, sender_password, wallet_set_up=False):
def send_funds_to_request(self, amount, sender_password=common_password, wallet_set_up=False):
gas_popup = self.element_by_text_part('Specify amount')
send_request_button = self.chat_element_by_text(amount).send_request_button
send_request_button.click_until_presence_of_element(gas_popup)
@ -335,7 +337,7 @@ class ChatView(BaseView):
self.clear_history_button.click()
self.clear_button.click()
def send_transaction_in_1_1_chat(self, asset, amount, password, wallet_set_up=False):
def send_transaction_in_1_1_chat(self, asset, amount, password=common_password, wallet_set_up=False):
self.commands_button.click()
self.send_command.click()
self.asset_by_name(asset).click()

View File

@ -1,3 +1,4 @@
from tests import common_password
from views.base_element import BaseText
from views.base_element import BaseButton, BaseEditBox
from views.base_view import BaseView, OkButton, ProgressBar
@ -168,7 +169,7 @@ class SendTransactionView(BaseView):
self.share_button = ShareButton(self.driver)
self.progress_bar = ProgressBar(self.driver)
def sign_transaction(self, sender_password):
def sign_transaction(self, sender_password: str = common_password):
self.sign_transaction_button.click_until_presence_of_element(self.enter_password_input)
self.enter_password_input.send_keys(sender_password)
self.sign_transaction_button.click_until_presence_of_element(self.progress_bar)

View File

@ -116,7 +116,7 @@ class SignInView(BaseView):
self.next_button.click()
return self.get_home_view()
def recover_access(self, passphrase, password):
def recover_access(self, passphrase: str, password: str = common_password):
recover_access_view = self.i_have_account_button.click()
recover_access_view.passphrase_input.click()
recover_access_view.send_as_keyevent(passphrase)