Check version format
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
a79544d043
commit
fc999c2462
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
import re
|
||||||
|
|
||||||
from tests import marks, bootnode_address, mailserver_address, camera_access_error_text, \
|
from tests import marks, bootnode_address, mailserver_address, camera_access_error_text, \
|
||||||
photos_access_error_text
|
photos_access_error_text
|
||||||
|
@ -353,6 +354,16 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||||
self.errors.append('Profile permission is not asked')
|
self.errors.append('Profile permission is not asked')
|
||||||
self.verify_no_errors()
|
self.verify_no_errors()
|
||||||
|
|
||||||
|
@marks.testrail_id(5428)
|
||||||
|
@marks.low
|
||||||
|
def test_version_format(self):
|
||||||
|
sign_in_view = SignInView(self.driver)
|
||||||
|
sign_in_view.create_user()
|
||||||
|
profile_view = sign_in_view.profile_button.click()
|
||||||
|
profile_view.about_button.click()
|
||||||
|
version = profile_view.version_text.text
|
||||||
|
if not re.search("\d{1}[.]\d{1,2}[.]\d{1,2}\s[(]\d*[)]", version):
|
||||||
|
self.driver.fail("Version %s didn't match expected format" % version)
|
||||||
|
|
||||||
@marks.all
|
@marks.all
|
||||||
@marks.account
|
@marks.account
|
||||||
|
|
|
@ -316,6 +316,15 @@ class FaqButton(BaseButton):
|
||||||
from views.web_views.base_web_view import BaseWebView
|
from views.web_views.base_web_view import BaseWebView
|
||||||
return BaseWebView(self.driver)
|
return BaseWebView(self.driver)
|
||||||
|
|
||||||
|
class AboutButton(BaseButton):
|
||||||
|
def __init__(self, driver):
|
||||||
|
super(AboutButton, self).__init__(driver)
|
||||||
|
self.locator = self.Locator.accessibility_id("about-button")
|
||||||
|
|
||||||
|
class VersionText(BaseText):
|
||||||
|
def __init__(self, driver):
|
||||||
|
super(VersionText, self).__init__(driver)
|
||||||
|
self.locator = self.Locator.xpath_selector("//*[@content-desc='version'][1]")
|
||||||
|
|
||||||
class BootnodesButton(BaseButton):
|
class BootnodesButton(BaseButton):
|
||||||
|
|
||||||
|
@ -492,6 +501,7 @@ 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.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)
|
||||||
|
@ -536,6 +546,7 @@ class ProfileView(BaseView):
|
||||||
self.help_button = HelpButton(self.driver)
|
self.help_button = HelpButton(self.driver)
|
||||||
self.submit_bug_button = SubmitBugButton(self.driver)
|
self.submit_bug_button = SubmitBugButton(self.driver)
|
||||||
self.faq_button = FaqButton(self.driver)
|
self.faq_button = FaqButton(self.driver)
|
||||||
|
self.about_button = AboutButton(self.driver)
|
||||||
|
|
||||||
# Bootnodes
|
# Bootnodes
|
||||||
self.bootnodes_button = BootnodesButton(self.driver)
|
self.bootnodes_button = BootnodesButton(self.driver)
|
||||||
|
|
Loading…
Reference in New Issue