extended search test

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-05-15 16:51:59 +02:00
parent 707a9b7095
commit 78a3f5aff5
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
5 changed files with 39 additions and 14 deletions

View File

@ -75,7 +75,7 @@ class TestCreateAccount(SingleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(6240)
@marks.testrail_id(5742)
@marks.medium
def test_keycard_interruption_creating_onboarding_flow(self):
sign_in = SignInView(self.driver)

View File

@ -1,7 +1,7 @@
import time
from tests import marks, camera_access_error_text
from tests.users import basic_user, dummy_user
from tests.users import basic_user, dummy_user, ens_user_ropsten
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from views.sign_in_view import SignInView
@ -207,26 +207,48 @@ class TestChatManagement(SingleDeviceTestCase):
def test_search_chat_on_home(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
search_list = list()
home.just_fyi('Join public chat, start 1-1 with username and with ENS')
chat_name = home.get_random_chat_name()
search_list.append(chat_name)
public_chat = home.join_public_chat(chat_name)
public_chat.get_back_to_home_view()
chat = home.add_contact(basic_user['public_key'])
search_list.append(basic_user['username'])
chat.get_back_to_home_view()
for public_key in (basic_user['public_key'], ens_user_ropsten['ens']):
chat = home.add_contact(public_key)
chat.get_back_to_home_view()
search_list = {
basic_user['username']: basic_user['username'],
ens_user_ropsten['username']: ens_user_ropsten['ens'],
chat_name: chat_name
}
home.just_fyi('Can search for public chat name, ens name, username')
home.swipe_down()
for keyword in search_list:
home.just_fyi('Search for %s' %keyword)
home.search_chat_input.click()
home.search_chat_input.send_keys(keyword)
search_results = home.chat_name_text.find_elements()
if not search_results:
self.errors.append('No search results after searching by %s keyword' % keyword)
for element in search_results:
if keyword not in element.text:
if search_list[keyword] not in element.text:
self.errors.append("'%s' is shown on the home screen after searching by '%s' keyword" %
(element.text, keyword))
(element.text, keyword))
home.cancel_button.click()
home.just_fyi('Can search for public chat while offline')
home.toggle_airplane_mode()
home.search_chat_input.click()
home.search_chat_input.send_keys(chat_name)
search_results = home.chat_name_text.find_elements()
if not search_results:
self.errors.append('No search results after searching by %s keyword' % chat_name)
for element in search_results:
if search_list[chat_name] not in element.text:
self.errors.append("'%s' is shown on the home screen after searching by '%s' keyword" %
(element.text, chat_name))
self.errors.verify_no_errors()
@marks.testrail_id(6221)

View File

@ -2,7 +2,7 @@ from _pytest.outcomes import Failed
import time
from tests import marks
from tests.users import transaction_senders, transaction_recipients
from tests.users import transaction_senders, transaction_recipients, ens_user_ropsten
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
from views.sign_in_view import SignInView
@ -272,11 +272,11 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
@marks.testrail_id(6279)
@marks.high
def test_send_eth_to_ens(self):
def test_send_eth_to_ens_in_chat(self):
sign_in = SignInView(self.driver)
sender = transaction_senders['E']
home = sign_in.recover_access(sender['passphrase'])
chat = home.add_contact('nastya')
chat = home.add_contact(ens_user_ropsten['ens'])
chat.commands_button.click()
amount = chat.get_unique_amount()

View File

@ -2,7 +2,7 @@ from _pytest.outcomes import Failed
import time
from tests import marks
from tests.users import transaction_senders, transaction_recipients
from tests.users import transaction_senders, transaction_recipients, ens_user_ropsten
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
from views.sign_in_view import SignInView
@ -184,7 +184,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
sender = transaction_senders['E']
home = sign_in.recover_access(sender['passphrase'], keycard=True)
chat = home.add_contact('nastya')
chat = home.add_contact(ens_user_ropsten['ens'])
chat.commands_button.click()
amount = chat.get_unique_amount()

View File

@ -15,6 +15,9 @@ ens_user['ens'] = 'statuse2e'
ens_user['ens_another_domain'] = 'statuse2e.eth'
ens_user['address'] = '0x1eE3058Bd300246B4B20E687Efc9Eba81FF7814b'
ens_user_ropsten = dict()
ens_user_ropsten['ens'] = 'nastya'
ens_user_ropsten['username'] = 'Thoughtful Stupendous Graywolf'
dummy_user = dict()
dummy_user['username'] = "Vain Wordy Hagfish"