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:
|
if sign_in.get_public_key() == public_key:
|
||||||
pytest.fail('New account was not created')
|
pytest.fail('New account was not created')
|
||||||
|
|
||||||
@marks.testrail_id(3692)
|
@marks.testrail_id(3787)
|
||||||
@marks.skip
|
@marks.smoke_1
|
||||||
def test_home_view(self):
|
def test_home_view(self):
|
||||||
sign_in = SignInView(self.driver)
|
sign_in = SignInView(self.driver)
|
||||||
home = sign_in.create_user()
|
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',
|
for text in ['Welcome to Status',
|
||||||
('Here you can securely chat with people, or browse and interact with DApps. '
|
'Here you can chat with people in a secure\n'
|
||||||
'Tap the “Plus” icon to begin.')]:
|
' 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():
|
if not home.element_by_text(text).is_element_displayed():
|
||||||
self.errors.append("'%s' text is not shown" % text)
|
self.errors.append("'%s' text is not shown" % text)
|
||||||
home.profile_button.click()
|
home.profile_button.click()
|
||||||
|
|
|
@ -116,16 +116,10 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||||
def test_invite_friends(self):
|
def test_invite_friends(self):
|
||||||
sign_in_view = SignInView(self.driver)
|
sign_in_view = SignInView(self.driver)
|
||||||
home = sign_in_view.create_user()
|
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 = home.plus_button.click()
|
||||||
start_new_chat.invite_friends_button.click()
|
start_new_chat.invite_friends_button.click()
|
||||||
start_new_chat.share_via_messenger()
|
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)
|
@marks.testrail_id(3450)
|
||||||
def test_set_currency(self):
|
def test_set_currency(self):
|
||||||
|
|
|
@ -3,6 +3,7 @@ import string
|
||||||
import time
|
import time
|
||||||
import base64
|
import base64
|
||||||
import pytest
|
import pytest
|
||||||
|
import re
|
||||||
import zbarlight
|
import zbarlight
|
||||||
from tests import info, common_password
|
from tests import info, common_password
|
||||||
from eth_keys import datatypes
|
from eth_keys import datatypes
|
||||||
|
@ -430,5 +431,5 @@ class BaseView(object):
|
||||||
def check_no_values_in_logcat(self, **kwargs):
|
def check_no_values_in_logcat(self, **kwargs):
|
||||||
logcat = self.logcat
|
logcat = self.logcat
|
||||||
for key, value in kwargs.items():
|
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)
|
pytest.fail('%s in logcat!!!' % key.capitalize(), pytrace=False)
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
from tests import info
|
from tests import info
|
||||||
import time
|
import time
|
||||||
from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
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
|
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):
|
class PlusButton(BaseButton):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(PlusButton, self).__init__(driver)
|
super(PlusButton, self).__init__(driver)
|
||||||
|
@ -97,7 +103,7 @@ class ChatUrlText(BaseText):
|
||||||
class HomeView(BaseView):
|
class HomeView(BaseView):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(HomeView, self).__init__(driver)
|
super(HomeView, self).__init__(driver)
|
||||||
|
self.welcome_image = WelcomeImageElement(self.driver)
|
||||||
self.plus_button = PlusButton(self.driver)
|
self.plus_button = PlusButton(self.driver)
|
||||||
self.console_button = ConsoleButton(self.driver)
|
self.console_button = ConsoleButton(self.driver)
|
||||||
self.chat_name_text = ChatNameText(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")
|
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):
|
class OtherAccountsButton(BaseButton):
|
||||||
|
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
|
|
Loading…
Reference in New Issue