Included test for home verification and false failures fix
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
74145b6e7f
commit
4663c03ac7
|
@ -42,14 +42,18 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
if sign_in.get_public_key() == public_key:
|
||||
pytest.fail('New account was not created')
|
||||
|
||||
@marks.testrail_id(3692)
|
||||
@marks.skip
|
||||
@marks.testrail_id(3787)
|
||||
@marks.smoke_1
|
||||
def test_home_view(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
if not home.welcome_image.is_element_displayed():
|
||||
self.errors.append('Welcome image is not shown')
|
||||
for text in ['Welcome to Status',
|
||||
('Here you can securely chat with people, or browse and interact with DApps. '
|
||||
'Tap the “Plus” icon to begin.')]:
|
||||
'Here you can chat with people in a secure\n'
|
||||
' private chat, browse and interact with DApps.\n'
|
||||
' Use the “Plus” icon to explore Status',
|
||||
]:
|
||||
if not home.element_by_text(text).is_element_displayed():
|
||||
self.errors.append("'%s' text is not shown" % text)
|
||||
home.profile_button.click()
|
||||
|
|
|
@ -116,16 +116,10 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
def test_invite_friends(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home = sign_in_view.create_user()
|
||||
wallet = home.wallet_button.click()
|
||||
wallet.set_up_wallet()
|
||||
wallet.receive_transaction_button.click()
|
||||
address = wallet.address_text.text[2:]
|
||||
wallet.get_back_to_home_view()
|
||||
wallet.home_button.click()
|
||||
start_new_chat = home.plus_button.click()
|
||||
start_new_chat.invite_friends_button.click()
|
||||
start_new_chat.share_via_messenger()
|
||||
start_new_chat.find_text_part("Get Status at http://status.im?refCode=%s" % address)
|
||||
start_new_chat.find_text_part("Get Status at http://status.im")
|
||||
|
||||
@marks.testrail_id(3450)
|
||||
def test_set_currency(self):
|
||||
|
|
|
@ -3,6 +3,7 @@ import string
|
|||
import time
|
||||
import base64
|
||||
import pytest
|
||||
import re
|
||||
import zbarlight
|
||||
from tests import info, common_password
|
||||
from eth_keys import datatypes
|
||||
|
@ -430,5 +431,5 @@ class BaseView(object):
|
|||
def check_no_values_in_logcat(self, **kwargs):
|
||||
logcat = self.logcat
|
||||
for key, value in kwargs.items():
|
||||
if value in logcat:
|
||||
if re.findall('\W%s|\W%s\W' % (value, value), logcat):
|
||||
pytest.fail('%s in logcat!!!' % key.capitalize(), pytrace=False)
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
from tests import info
|
||||
import time
|
||||
from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
||||
from views.base_element import BaseButton, BaseText
|
||||
from views.base_element import BaseButton, BaseText, BaseElement
|
||||
from views.base_view import BaseView
|
||||
|
||||
|
||||
class WelcomeImageElement(BaseElement):
|
||||
def __init__(self, driver):
|
||||
super(WelcomeImageElement, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//android.widget.ImageView')
|
||||
|
||||
|
||||
class PlusButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(PlusButton, self).__init__(driver)
|
||||
|
@ -97,7 +103,7 @@ class ChatUrlText(BaseText):
|
|||
class HomeView(BaseView):
|
||||
def __init__(self, driver):
|
||||
super(HomeView, self).__init__(driver)
|
||||
|
||||
self.welcome_image = WelcomeImageElement(self.driver)
|
||||
self.plus_button = PlusButton(self.driver)
|
||||
self.console_button = ConsoleButton(self.driver)
|
||||
self.chat_name_text = ChatNameText(self.driver)
|
||||
|
|
|
@ -73,28 +73,6 @@ class NameInput(BaseEditBox):
|
|||
self.locator = self.Locator.xpath_selector("//android.widget.EditText")
|
||||
|
||||
|
||||
class LearnMoreLink(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(LearnMoreLink, self).__init__(driver)
|
||||
self.locator = self.Locator.text_selector('Learn more about what we collect')
|
||||
|
||||
|
||||
class ShareDataButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(ShareDataButton, self).__init__(driver)
|
||||
self.locator = self.Locator.text_selector('Share data')
|
||||
|
||||
|
||||
class DonNotShareButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(DonNotShareButton, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//*[@text="NO, I DON%sT WANT TO SHARE" '
|
||||
'or @text="Do not share"]' % "'")
|
||||
|
||||
|
||||
class OtherAccountsButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
|
|
Loading…
Reference in New Issue