False failures fix

Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-10-18 11:23:54 +03:00 committed by Anton Danchenko
parent 8e9f0143ad
commit 75ade1673b
No known key found for this signature in database
GPG Key ID: C2D4819B698627E4
5 changed files with 12 additions and 7 deletions

View File

@ -164,7 +164,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_2_chat = chat_element.click()
if not device_2_chat.chat_element_by_text(message).is_element_displayed():
self.errors.append("Message with text '%s' was not received" % message)
device_2_chat.reconnect()
device_2_chat.connection_status.wait_for_invisibility_of_element(60)
device_2_chat.add_to_contacts.click()
device_2_chat.get_back_to_home_view()
@ -234,14 +234,14 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
sign_in.driver.set_network_connection(1) # airplane mode
if home_view.connection_status.text != 'Offline':
self.errors.append('Offline status is not shown in home screen')
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()
if home_view.connection_status.text != 'Offline':
self.errors.append('Offline status is not shown in home screen')
public_chat = home_view.join_public_chat(home_view.get_public_chat_name())
if public_chat.connection_status.text != 'Offline':
self.errors.append('Offline status is not shown in a public chat')

View File

@ -275,8 +275,6 @@ class BaseView(object):
self.apps_button = AppsButton(self.driver)
self.status_app_icon = StatusAppIcon(self.driver)
self.test_fairy_warning = TestFairyWarning(self.driver)
self.wallet_modal_button = WalletModalButton(self.driver)
self.element_types = {

View File

@ -396,6 +396,10 @@ class AboutButton(BaseButton):
from views.about_view import AboutView
return AboutView(self.driver)
def click(self):
self.scroll_to_element().click()
return self.navigate()
class ProfileView(BaseView):

View File

@ -136,7 +136,7 @@ class SignInView(BaseView):
recover_access_view.send_as_keyevent(passphrase)
recover_access_view.password_input.click()
recover_access_view.send_as_keyevent(password)
recover_access_view.sign_in_button.click()
recover_access_view.sign_in_button.click_until_presence_of_element(recover_access_view.home_button)
return self.get_home_view()
def open_status_test_dapp(self):

View File

@ -21,6 +21,9 @@ class AssetsButton(BaseButton):
from views.send_transaction_view import SendTransactionView
return SendTransactionView(self.driver)
def click(self):
self.click_until_presence_of_element(self.RequestSTTButton(self.driver))
class TransactionsButton(BaseButton):