Fix autotests for new welcome screen
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
ad4c6ce94f
commit
036692f8ba
|
@ -49,18 +49,31 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
@marks.high
|
||||
def test_home_view(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
if not home.welcome_image.is_element_displayed():
|
||||
sign_in.accept_agreements()
|
||||
sign_in.create_account_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()
|
||||
|
||||
welcome_screen = sign_in.get_home_view()
|
||||
|
||||
if not welcome_screen.welcome_image.is_element_displayed():
|
||||
self.errors.append('Welcome image is not shown')
|
||||
for text in ['Welcome to Status',
|
||||
'Tap the plus (+) button to get started']:
|
||||
if not home.element_by_text(text).is_element_displayed():
|
||||
'Here you can chat with people in a secure private chat, browse and interact with DApps.']:
|
||||
if not welcome_screen.element_by_text(text).is_element_displayed():
|
||||
self.errors.append("'%s' text is not shown" % text)
|
||||
home.profile_button.click()
|
||||
home.home_button.click()
|
||||
text = 'Your Home screen will house your recent chats and DApp history. Tap the plus (+) button to get started.'
|
||||
if not home.element_by_text(text).is_element_displayed():
|
||||
|
||||
welcome_screen.get_started_button.click()
|
||||
text = 'There are no recent chats here yet. \nUse the (+) button to discover people \nto chat with'
|
||||
if not welcome_screen.element_by_text(text).is_element_displayed():
|
||||
self.errors.append("'%s' text is not shown" % text)
|
||||
|
||||
self.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5460)
|
||||
|
|
|
@ -261,6 +261,13 @@ class ShowRoots(BaseButton):
|
|||
self.locator = self.Locator.accessibility_id('Show roots')
|
||||
|
||||
|
||||
class GetStartedButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(GetStartedButton, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//*[@text='GET STARTED']")
|
||||
|
||||
|
||||
class AssetButton(BaseButton):
|
||||
def __init__(self, driver, asset_name):
|
||||
super(AssetButton, self).__init__(driver)
|
||||
|
@ -303,6 +310,7 @@ class BaseView(object):
|
|||
self.connection_status = ConnectionStatusText(self.driver)
|
||||
self.cross_icon = CrossIcon(self.driver)
|
||||
self.show_roots_button = ShowRoots(self.driver)
|
||||
self.get_started_button = GetStartedButton(self.driver)
|
||||
|
||||
self.apps_button = AppsButton(self.driver)
|
||||
self.status_app_icon = StatusAppIcon(self.driver)
|
||||
|
|
|
@ -125,6 +125,7 @@ class SignInView(BaseView):
|
|||
self.name_input.set_value(username)
|
||||
|
||||
self.next_button.click()
|
||||
self.get_started_button.click()
|
||||
return self.get_home_view()
|
||||
|
||||
def recover_access(self, passphrase: str, password: str = common_password):
|
||||
|
|
Loading…
Reference in New Issue