From be9cd1b050e60a0b4326cb02461104c4860de913 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Mon, 19 Aug 2019 12:14:23 +0200 Subject: [PATCH] Revert "Added tests for multiaccount" This reverts commit 5fc358469a0b765e00b1509f312bac3476f4210b. Signed-off-by: Andrea Maria Piana --- .../test_wallet_management.py | 34 +----- test/appium/tests/atomic/chats/test_public.py | 6 +- .../tests/atomic/transactions/test_wallet.py | 78 ++------------ .../multi_account_color.png | Bin 2015 -> 0 bytes test/appium/views/send_transaction_view.py | 7 -- test/appium/views/wallet_view.py | 98 ++---------------- 6 files changed, 21 insertions(+), 202 deletions(-) delete mode 100644 test/appium/views/elements_templates/multi_account_color.png diff --git a/test/appium/tests/atomic/account_management/test_wallet_management.py b/test/appium/tests/atomic/account_management/test_wallet_management.py index b47c70d50a..1702195d7b 100644 --- a/test/appium/tests/atomic/account_management/test_wallet_management.py +++ b/test/appium/tests/atomic/account_management/test_wallet_management.py @@ -1,8 +1,6 @@ import pytest -import random -import string -from tests import marks, camera_access_error_text, common_password +from tests import marks, camera_access_error_text from tests.base_test_case import SingleDeviceTestCase from tests.users import wallet_users, transaction_senders, basic_user from views.sign_in_view import SignInView @@ -258,33 +256,3 @@ class TestWalletManagement(SingleDeviceTestCase): if not token_element.is_element_displayed(): self.errors.append('Custom token is not shown on Send Transaction view') self.verify_no_errors() - - @marks.testrail_id(6224) - @marks.critical - def test_add_account_to_multiaccount_instance(self): - 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.add_account_button.click() - wallet_view.add_an_account_button.click() - wallet_view.generate_new_account_button.click() - wallet_view.generate_account_button.click() - if wallet_view.element_by_text('Account added').is_element_displayed(): - self.driver.fail('Account is added without password') - wallet_view.enter_your_password_input.send_keys('000000') - wallet_view.generate_account_button.click() - if not wallet_view.element_by_text_part('Password seems to be incorrect').is_element_displayed(): - self.driver.fail("Incorrect password validation is not performed") - wallet_view.enter_your_password_input.clear() - wallet_view.enter_your_password_input.send_keys(common_password) - wallet_view.generate_account_button.click() - account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10)) - wallet_view.account_name_input.send_keys(account_name) - wallet_view.account_color_button.select_color_by_position(1) - wallet_view.finish_button.click() - account_button = wallet_view.get_account_by_name(account_name) - if not account_button.is_element_displayed(): - self.driver.fail('Account was not added') - if not account_button.color_matches('multi_account_color.png'): - self.driver.fail('Account color does not match expected') diff --git a/test/appium/tests/atomic/chats/test_public.py b/test/appium/tests/atomic/chats/test_public.py index a2f704a17a..e7b7552bf6 100644 --- a/test/appium/tests/atomic/chats/test_public.py +++ b/test/appium/tests/atomic/chats/test_public.py @@ -2,7 +2,6 @@ import time import emoji import random -from dateutil import parser from selenium.common.exceptions import TimeoutException from support.utilities import generate_timestamp from tests import marks @@ -224,9 +223,8 @@ class TestPublicChatSingleDevice(SingleDeviceTestCase): @marks.high def test_fetch_more_history_in_empty_chat(self): signin = SignInView(self.driver) - device_time = parser.parse(signin.driver.device_time) - yesterday = (device_time - timedelta(days=1)).strftime("%b %-d, %Y") - before_yesterday = (device_time - timedelta(days=2)).strftime("%b %-d, %Y") + yesterday = (datetime.today() - timedelta(days=1)).strftime("%b %-d, %Y") + before_yesterday = (datetime.today() - timedelta(days=2)).strftime("%b %-d, %Y") quiet_time_yesterday, quiet_time_before_yesterday = '24 hours', '2 days' home_view = signin.create_user() chat = home_view.join_public_chat('montagne-angerufen-two') diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index 5c89a01c80..faec2cb3b0 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -410,73 +410,16 @@ 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'): - self.driver.fail('EUR currency is not displayed') - - @marks.testrail_id(6225) - @marks.high - def test_send_funds_between_accounts_in_multiaccount_instance(self): - sign_in_view = SignInView(self.driver) - sign_in_view.create_user() - wallet_view = sign_in_view.wallet_button.click() - wallet_view.set_up_wallet() - address = wallet_view.get_wallet_address()[2:] - wallet_view.back_button.click() - self.network_api.get_donate(address) - - account_name = 'test account' - wallet_view.add_account(account_name) - 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() - send_transaction.amount_edit_box.set_value(transaction_amount) - send_transaction.confirm() - send_transaction.chose_recipient_button.click() - send_transaction.accounts_button.click() - send_transaction.element_by_text(account_name).click() - send_transaction.sign_transaction_button.click() - send_transaction.sign_transaction() - self.network_api.wait_for_confirmation_of_transaction(address, transaction_amount) - self.network_api.verify_balance_is_updated('0.1', address) - wallet_view.back_button.click() - wallet_view.get_account_by_name(account_name).click() - wallet_view.send_transaction_button.click() - wallet_view.back_button.click() - balance_after_receiving_tx = wallet_view.eth_asset_value.text - if balance_after_receiving_tx != transaction_amount: - self.driver.fail('New account balance %s does not match expected %s after receiving a transaction' % ( - balance_after_receiving_tx, transaction_amount)) - updated_balance = self.network_api.get_balance(address) - - wallet_view.send_transaction_button.click() - send_transaction.amount_edit_box.click() - transaction_amount_1 = float(transaction_amount) * 0.7 - send_transaction.amount_edit_box.set_value(str(transaction_amount_1)) - send_transaction.confirm() - send_transaction.chose_recipient_button.click() - send_transaction.accounts_button.click() - send_transaction.element_by_text('Status account').click() - send_transaction.sign_transaction_button.click() - total_fee = send_transaction.get_transaction_fee_total() - send_transaction.sign_transaction() - if not wallet_view.element_by_text('Transaction sent').is_element_displayed(): - self.driver.fail('Transaction was not sent from the new account') - self.network_api.wait_for_confirmation_of_transaction(address, transaction_amount) - self.network_api.verify_balance_is_updated(updated_balance, address) - balance_after_sending_tx = wallet_view.eth_asset_value.text - expected_balance = str(float(balance_after_receiving_tx) - transaction_amount_1 - float(total_fee)) - if balance_after_sending_tx != expected_balance: - self.driver.fail('New account balance %s does not match expected %s after sending a transaction' % ( - balance_after_sending_tx, transaction_amount)) + @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 @@ -518,3 +461,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() + diff --git a/test/appium/views/elements_templates/multi_account_color.png b/test/appium/views/elements_templates/multi_account_color.png deleted file mode 100644 index ae7e7c9d50af82d4b02c6c29da8b9bd5f64a2cca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2015 zcmV<52O#)~P)wT7NA6*i4#b=i)sg9gRyn$grDgb+ebP{!}sY&W()c^juvU*Iu< zq!91OF_HKjB6m~o4&4i@AN&~+Q4YlCzBvBa4*{Y};3$iYo3GzldG*f9tNF~$BXw=t zW_IUe#3_bTyIFz+0I-~lgKaOpGSq)-^-cVU`d>Yd4sD}`h^$PooP6y4>*aemKtwr+ z2nhfPO)imSC#M$n?u_=&Afjl~$3D41R0?TCXoio^p9@4Dry1dRhiKMIh_Jk;GZp}V z7yZ~`Kes;GdB5Y#d5(8lLs2TEc*&<~Nk9Oa;RDf=T4bSF-*425waVU@wZ`GV@lMlR zhk(AM1)+`CJP5Ph?D!n_QyPWc^tEQaq(x4k>VP0gLDmFW^M~flcC%j1?dR4TwZa4U zkE<%2N*z@xK@bN$hTk2T+m0Qj{6@L3sc6%(GQo>}n(019hWGlXJif_tVRLW$gTYdL z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