Fix app version and deeplink tests
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
4a95b88e36
commit
2c56de0872
|
@ -347,17 +347,19 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||||
home_view = sign_in_view.create_user()
|
home_view = sign_in_view.create_user()
|
||||||
profile_view = home_view.profile_button.click()
|
profile_view = home_view.profile_button.click()
|
||||||
profile_view.about_button.click()
|
profile_view.about_button.click()
|
||||||
version_text = profile_view.version_text.text
|
app_version = profile_view.app_version_text.text
|
||||||
if not re.search("\d{1}[.]\d{1,2}[.]\d{1,2}\s[(]\d*[)];\sStatusIM\/android-\d{3}\/go\d{1}[.]\d{1,2}[.]\d{1,2}",
|
node_version = profile_view.node_version_text.text
|
||||||
version_text):
|
if not re.search("\d{1}[.]\d{1,2}[.]\d{1,2}\s[(]\d*[)]", app_version):
|
||||||
self.errors.append("Version %s didn't match expected format" % version_text)
|
self.errors.append("App version %s didn't match expected format" % app_version)
|
||||||
profile_view.version_text.click()
|
if not re.search("StatusIM\/android-\d{3}\/go\d{1}[.]\d{1,2}[.]\d{1,2}", node_version):
|
||||||
|
self.errors.append("Node version %s didn't match expected format" % node_version)
|
||||||
|
profile_view.app_version_text.click()
|
||||||
profile_view.back_button.click()
|
profile_view.back_button.click()
|
||||||
profile_view.home_button.click()
|
profile_view.home_button.click()
|
||||||
chat = home_view.join_public_chat(home_view.get_public_chat_name())
|
chat = home_view.join_public_chat(home_view.get_public_chat_name())
|
||||||
message_input = chat.chat_message_input
|
message_input = chat.chat_message_input
|
||||||
message_input.paste_text_from_clipboard()
|
message_input.paste_text_from_clipboard()
|
||||||
if message_input.text != version_text:
|
if message_input.text != app_version:
|
||||||
self.errors.append('Version number was not copied to clipboard')
|
self.errors.append('Version number was not copied to clipboard')
|
||||||
self.verify_no_errors()
|
self.verify_no_errors()
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class TestDeepLinks(SingleDeviceTestCase):
|
||||||
profile_view = sign_in_view.get_profile_view()
|
profile_view = sign_in_view.get_profile_view()
|
||||||
if profile_view.default_username_text.text != basic_user['username'] \
|
if profile_view.default_username_text.text != basic_user['username'] \
|
||||||
or not profile_view.contacts_button.is_element_displayed() \
|
or not profile_view.contacts_button.is_element_displayed() \
|
||||||
or profile_view.share_my_profile_button.is_element_displayed():
|
or not profile_view.share_my_profile_button.is_element_displayed():
|
||||||
self.driver.fail("Own profile screen is not opened!")
|
self.driver.fail("Own profile screen is not opened!")
|
||||||
|
|
||||||
@marks.testrail_id(5781)
|
@marks.testrail_id(5781)
|
||||||
|
|
|
@ -311,10 +311,16 @@ class FaqButton(BaseButton):
|
||||||
return BaseWebView(self.driver)
|
return BaseWebView(self.driver)
|
||||||
|
|
||||||
|
|
||||||
class VersionText(BaseText):
|
class AppVersionText(BaseText):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(VersionText, self).__init__(driver)
|
super(AppVersionText, self).__init__(driver)
|
||||||
self.locator = self.Locator.xpath_selector("//*[@content-desc='version']//android.widget.TextView[2]")
|
self.locator = self.Locator.xpath_selector("//*[@content-desc='app-version']//android.widget.TextView[2]")
|
||||||
|
|
||||||
|
|
||||||
|
class NodeVersionText(BaseText):
|
||||||
|
def __init__(self, driver):
|
||||||
|
super(NodeVersionText, self).__init__(driver)
|
||||||
|
self.locator = self.Locator.xpath_selector("//*[@content-desc='node-version']//android.widget.TextView[2]")
|
||||||
|
|
||||||
|
|
||||||
class BootnodesButton(BaseButton):
|
class BootnodesButton(BaseButton):
|
||||||
|
@ -511,7 +517,8 @@ class ProfileView(BaseView):
|
||||||
self.public_key_text = PublicKeyText(self.driver)
|
self.public_key_text = PublicKeyText(self.driver)
|
||||||
self.profile_address_text = ProfileAddressText(self.driver)
|
self.profile_address_text = ProfileAddressText(self.driver)
|
||||||
self.about_button = AboutButton(self.driver)
|
self.about_button = AboutButton(self.driver)
|
||||||
self.version_text = VersionText(self.driver)
|
self.app_version_text = AppVersionText(self.driver)
|
||||||
|
self.node_version_text = NodeVersionText(self.driver)
|
||||||
|
|
||||||
self.network_settings_button = NetworkSettingsButton(self.driver)
|
self.network_settings_button = NetworkSettingsButton(self.driver)
|
||||||
self.active_network_name = ActiveNetworkName(self.driver)
|
self.active_network_name = ActiveNetworkName(self.driver)
|
||||||
|
|
Loading…
Reference in New Issue