review TODO
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
1956671e7d
commit
1caec28d03
|
@ -11,29 +11,6 @@ from tests.users import basic_user
|
|||
@marks.account
|
||||
class TestCreateAccount(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5300)
|
||||
@marks.critical
|
||||
@marks.battery_consumption
|
||||
@marks.skip
|
||||
# skipped because it is a part of other tests
|
||||
# obsolate
|
||||
def test_create_account(self):
|
||||
sign_in = SignInView(self.driver, skip_popups=False)
|
||||
sign_in.accept_agreements()
|
||||
if not sign_in.i_have_multiaccount_button.is_element_displayed():
|
||||
self.errors.append("'I have an account' button is not displayed")
|
||||
sign_in.create_multiaccount_button.click()
|
||||
sign_in.password_input.set_value(common_password)
|
||||
sign_in.next_button.click()
|
||||
sign_in.confirm_password_input.set_value(common_password)
|
||||
sign_in.next_button.click()
|
||||
|
||||
sign_in.element_by_text_part('Display name').wait_for_element(30)
|
||||
sign_in.name_input.send_keys('user_%s' % get_current_time())
|
||||
|
||||
sign_in.next_button.click()
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5356)
|
||||
@marks.critical
|
||||
def test_switch_users_and_add_new_account(self):
|
||||
|
|
|
@ -584,7 +584,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
@marks.testrail_id(5432)
|
||||
@marks.medium
|
||||
@marks.skip
|
||||
# TODO: e2e blocker: no force-logout after enabling bootnode (enable after fix)
|
||||
# TODO: e2e blocker 9135: no force-logout after enabling bootnode (enable after fix)
|
||||
def test_custom_bootnodes(self):
|
||||
self.create_drivers(2)
|
||||
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
|
|
|
@ -27,25 +27,6 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
|
|||
self.errors.append('Back up seed phrase option is active for recovered account!')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.skip
|
||||
@marks.testrail_id(845)
|
||||
# test doesn't exist in TestRail
|
||||
# obsolate
|
||||
def test_recover_account_with_incorrect_passphrase(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
sign_in.create_user()
|
||||
public_key = sign_in.get_public_key()
|
||||
profile = sign_in.get_profile_view()
|
||||
profile.backup_recovery_phrase_button.click()
|
||||
profile.ok_continue_button.click()
|
||||
recovery_phrase = profile.get_recovery_phrase()
|
||||
|
||||
self.driver.reset()
|
||||
sign_in.accept_agreements()
|
||||
sign_in.recover_access(passphrase=' '.join(list(recovery_phrase.values())[::-1]))
|
||||
if sign_in.get_public_key() == public_key:
|
||||
self.driver.fail('The same account is recovered with reversed passphrase')
|
||||
|
||||
@marks.logcat
|
||||
@marks.testrail_id(5366)
|
||||
@marks.critical
|
||||
|
@ -58,6 +39,7 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
|
||||
class TestRecoverAccessFromSignInScreen(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5363)
|
||||
@marks.high
|
||||
def test_pass_phrase_validation(self):
|
||||
|
|
|
@ -349,11 +349,10 @@ class TestWalletManagement(SingleDeviceTestCase):
|
|||
wallet_view.yes_button.click()
|
||||
if account_button.is_element_displayed():
|
||||
self.driver.fail('Account was not deleted')
|
||||
# TODO: uncomment check of assets after fix of 9717
|
||||
# for asset in ('ETHro', 'ADI', 'STT'):
|
||||
# balance = wallet_view.get_asset_amount_by_name(asset)
|
||||
# if balance != 0:
|
||||
# self.errors.append("Balance for %s is not updated after deleting watch-only account" % asset)
|
||||
for asset in ('ETHro', 'ADI', 'STT'):
|
||||
balance = wallet_view.get_asset_amount_by_name(asset)
|
||||
if balance != 0:
|
||||
self.errors.append("Balance for %s is not updated after deleting watch-only account" % asset)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
|
|
@ -273,8 +273,6 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
|||
chat_1.element_by_text(username, 'text'),
|
||||
chat_1.add_to_contacts,
|
||||
chat_1.profile_send_message,
|
||||
# TODO: temporary skipped due to 8601
|
||||
# chat_1.profile_send_transaction,
|
||||
chat_1.profile_address_text]:
|
||||
if not element.scroll_to_element():
|
||||
self.errors.append('%s is not visible' % element.name)
|
||||
|
|
|
@ -3,7 +3,6 @@ import time
|
|||
import emoji
|
||||
import random
|
||||
import string
|
||||
from datetime import datetime
|
||||
from selenium.common.exceptions import TimeoutException
|
||||
|
||||
from tests import marks, get_current_time
|
||||
|
@ -364,44 +363,48 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.skip
|
||||
@marks.testrail_id(5385)
|
||||
@marks.high
|
||||
# TODO: update with correct time - doesn't work for now
|
||||
def test_timestamp_in_chats(self):
|
||||
self.create_drivers(2)
|
||||
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
username_1 = 'user_%s' % get_current_time()
|
||||
device_1_home, device_2_home = sign_in_1.create_user(), sign_in_2.create_user()
|
||||
device_2_public_key = device_2_home.get_public_key()
|
||||
device_2_home.home_button.click()
|
||||
device_1_profile = device_1_home.profile_button.click()
|
||||
default_username_1 = device_1_profile.default_username_text.text
|
||||
device_1_profile.home_button.click()
|
||||
|
||||
device_1_chat = device_1_home.add_contact(device_2_public_key)
|
||||
|
||||
device_1_chat.just_fyi('check user picture and timestamps in chat for sender and recipient in 1-1 chat')
|
||||
message = 'test text'
|
||||
device_1_chat.chat_message_input.send_keys(message)
|
||||
device_1_chat.send_message_button.click()
|
||||
sent_time = datetime.strptime(device_1_chat.driver.device_time, '%a %b %d %H:%M:%S GMT %Y').strftime("%I:%M %p")
|
||||
sent_time = device_1_chat.convert_device_time_to_chat_timestamp()
|
||||
|
||||
if not device_1_chat.chat_element_by_text(message).contains_text(sent_time):
|
||||
self.errors.append('Timestamp is not displayed in 1-1 chat for the sender')
|
||||
if device_1_chat.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
self.errors.append('Member photo is displayed in 1-1 chat for the sender')
|
||||
|
||||
device_2_chat = device_2_home.get_chat_with_user(username_1).click()
|
||||
device_2_chat = device_2_home.get_chat_with_user(default_username_1).click()
|
||||
if not device_2_chat.chat_element_by_text(message).contains_text(sent_time):
|
||||
self.errors.append('Timestamp is not displayed in 1-1 chat for the recipient')
|
||||
if not device_2_chat.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
self.errors.append('Member photo is not displayed in 1-1 chat for the recipient')
|
||||
if device_2_chat.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
self.errors.append('Member photo is displayed in 1-1 chat for the recipient')
|
||||
for chat in device_1_chat, device_2_chat:
|
||||
chat.verify_message_is_under_today_text(message, self.errors)
|
||||
|
||||
device_1_chat.get_back_to_home_view()
|
||||
device_2_chat.get_back_to_home_view()
|
||||
device_1_chat.just_fyi('check user picture and timestamps in chat for sender and recipient in public chat')
|
||||
chat_name = device_1_home.get_public_chat_name()
|
||||
device_1_home.join_public_chat(chat_name)
|
||||
device_2_home.join_public_chat(chat_name)
|
||||
for chat in device_1_chat, device_2_chat:
|
||||
home_view = chat.get_back_to_home_view()
|
||||
home_view.join_public_chat(chat_name)
|
||||
|
||||
device_2_chat.chat_message_input.send_keys(message)
|
||||
device_2_chat.send_message_button.click()
|
||||
sent_time = datetime.strptime(device_2_chat.driver.device_time, '%a %b %d %H:%M:%S GMT %Y').strftime("%I:%M %p")
|
||||
sent_time = device_2_chat.convert_device_time_to_chat_timestamp()
|
||||
if not device_2_chat.chat_element_by_text(message).contains_text(sent_time):
|
||||
self.errors.append('Timestamp is not displayed in public chat for the sender')
|
||||
if device_2_chat.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
|
@ -410,7 +413,9 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
if not device_1_chat.chat_element_by_text(message).contains_text(sent_time):
|
||||
self.errors.append('Timestamp is not displayed in public chat for the recipient')
|
||||
if not device_1_chat.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
self.errors.append('Member photo is not displayed in 1-1 chat for the recipient')
|
||||
self.errors.append('Member photo is not displayed in public chat for the recipient')
|
||||
for chat in device_1_chat, device_2_chat:
|
||||
chat.verify_message_is_under_today_text(message, self.errors)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
|
|||
chat_1.chat_message_input.send_keys(message)
|
||||
chat_1.send_message_button.click()
|
||||
|
||||
# chat_2.verify_message_is_under_today_text(message, self.errors)
|
||||
if chat_2.chat_element_by_text(message).username.text != default_username_1:
|
||||
self.errors.append("Default username '%s' is not shown next to the received message" % default_username_1)
|
||||
|
||||
|
@ -160,59 +159,6 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
|
|||
@marks.chat
|
||||
class TestPublicChatSingleDevice(SingleDeviceTestCase):
|
||||
|
||||
@marks.skip
|
||||
@marks.testrail_id(5392)
|
||||
@marks.high
|
||||
# TODO: update to use korean keyboard
|
||||
def test_send_korean_characters(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
chat_name = home.get_public_chat_name()
|
||||
public_chat = home.join_public_chat(chat_name)
|
||||
message = '파란하늘'
|
||||
public_chat.chat_message_input.send_keys(message)
|
||||
if public_chat.chat_message_input.text != message:
|
||||
self.errors.append('Korean characters are not displayed properly in the chat message input')
|
||||
public_chat.send_message_button.click()
|
||||
if not public_chat.chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append('Message with korean characters is not shown')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.skip
|
||||
@marks.testrail_id(5336)
|
||||
@marks.medium
|
||||
# skipped as it is a part of other tests
|
||||
def test_user_can_interact_with_public_chat(self):
|
||||
signin = SignInView(self.driver)
|
||||
home_view = signin.create_user()
|
||||
chat = home_view.join_public_chat('evripidis-middellijn')
|
||||
|
||||
try:
|
||||
chat.empty_public_chat_message.wait_for_invisibility_of_element()
|
||||
except TimeoutException:
|
||||
self.driver.fail('Empty chat: history is not fetched!')
|
||||
|
||||
# just to generate random text to be sent
|
||||
text = generate_timestamp()
|
||||
chat.send_message(text)
|
||||
|
||||
if not chat.chat_element_by_text(text).is_element_displayed():
|
||||
self.errors.append('User sent message but it did not appear in chat!')
|
||||
|
||||
chat.move_to_messages_by_time_marker('Today')
|
||||
if not chat.element_by_text('Today').is_element_displayed():
|
||||
self.errors.append("'Today' chat marker is not shown")
|
||||
if len(chat.chat_item.find_elements()) <= 1:
|
||||
self.errors.append('No messages fetched for today!')
|
||||
|
||||
chat.move_to_messages_by_time_marker('Yesterday')
|
||||
if not chat.element_by_text('Yesterday').is_element_displayed():
|
||||
self.errors.append("'Yesterday' chat marker is not shown")
|
||||
if len(chat.chat_item.find_elements()) <= 1:
|
||||
self.errors.append('No messages fetched for yesterday!')
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5675)
|
||||
@marks.high
|
||||
def test_redirect_to_public_chat_tapping_tag_message(self):
|
||||
|
|
|
@ -97,21 +97,19 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
browsing_view.element_by_text('Google').wait_for_element(30)
|
||||
|
||||
@marks.testrail_id(5321)
|
||||
@marks.skip
|
||||
@marks.critical
|
||||
# TODO: update to use some static website
|
||||
def test_back_forward_buttons_browsing_website(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
daap_view = home.dapp_tab_button.click()
|
||||
browsing_view = daap_view.open_url('www.wikipedia.org')
|
||||
browsing_view.element_by_text_part('Русский', 'button').click()
|
||||
browsing_view.find_text_part('Избранная статья')
|
||||
browsing_view = daap_view.open_url('status.im')
|
||||
browsing_view.element_by_text_part('Get Involved', 'button').click()
|
||||
browsing_view.find_text_part('An Open Source Community')
|
||||
browsing_view.browser_previous_page_button.click()
|
||||
browsing_view.find_text_part('English', 15)
|
||||
browsing_view.find_text_part('Get Status', 15)
|
||||
|
||||
browsing_view.browser_next_page_button.click()
|
||||
browsing_view.find_text_part('Избранная статья')
|
||||
browsing_view.find_text_part('An Open Source Community')
|
||||
browsing_view.back_to_home_button.click()
|
||||
|
||||
@marks.testrail_id(5354)
|
||||
|
|
|
@ -154,24 +154,6 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
if values_in_logcat:
|
||||
self.driver.fail(values_in_logcat)
|
||||
|
||||
@marks.testrail_id(5372)
|
||||
@marks.high
|
||||
@marks.skip
|
||||
# skipped because it is part of other tests
|
||||
def test_request_eth_in_status_test_dapp(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home_view = sign_in_view.create_user()
|
||||
status_test_dapp = home_view.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.assets_button.click()
|
||||
status_test_dapp.request_eth_button.click()
|
||||
status_test_dapp.element_by_text_part('Faucet request').wait_for_visibility_of_element()
|
||||
status_test_dapp.ok_button.click()
|
||||
status_test_dapp.cross_icon.click()
|
||||
wallet_view = sign_in_view.wallet_button.click()
|
||||
wallet_view.set_up_wallet()
|
||||
wallet_view.wait_balance_is_equal_expected_amount()
|
||||
|
||||
@marks.testrail_id(5355)
|
||||
@marks.medium
|
||||
def test_onboarding_screen_when_requesting_tokens_for_new_account(self):
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import time
|
||||
from datetime import datetime
|
||||
import dateutil.parser
|
||||
|
||||
from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
||||
|
||||
|
@ -628,3 +630,9 @@ class ChatView(BaseView):
|
|||
def block_contact(self):
|
||||
self.profile_block_contact.click()
|
||||
self.block_contact_button.click()
|
||||
|
||||
def convert_device_time_to_chat_timestamp(self):
|
||||
sent_time_object = dateutil.parser.parse(self.driver.device_time)
|
||||
timestamp = datetime.strptime("%s:%s" % (sent_time_object.hour, sent_time_object.minute), '%H:%M').strftime("%I:%M %p")
|
||||
timestamp = timestamp[1:] if timestamp[0] == '0' else timestamp
|
||||
return timestamp
|
||||
|
|
Loading…
Reference in New Issue