Fix tests and disable non-relevant

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2020-02-05 20:20:24 +02:00
parent f9c15be1d4
commit dcfac1c4e2
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
4 changed files with 11 additions and 6 deletions

View File

@ -226,6 +226,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(5475)
@marks.low
@marks.skip
# TODO: skip until profile picture change feature is enabled
def test_change_profile_picture_several_times(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
@ -392,6 +394,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(5468)
@marks.medium
@marks.skip
# TODO: skip until profile picture change feature is enabled
def test_deny_camera_access_changing_profile_photo(self):
sign_in = SignInView(self.driver)
sign_in.create_user()
@ -408,6 +412,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(5469)
@marks.medium
@marks.skip
# TODO: skip until profile picture change feature is enabled
def test_deny_device_storage_access_changing_profile_photo(self):
sign_in = SignInView(self.driver)
sign_in.create_user()

View File

@ -278,7 +278,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(5362)
@marks.critical
@marks.medium
def test_unread_messages_counter_1_1_chat(self):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -308,7 +308,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
if device_1_home.home_button.counter.is_element_displayed():
self.errors.append('New messages counter is shown on Home button for already seen message')
if chat_element.new_messages_counter.is_element_displayed():
if chat_element.new_messages_counter.text == '1':
self.errors.append('New messages counter is shown on chat element for already seen message')
self.errors.verify_no_errors()

View File

@ -117,7 +117,7 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
if home_1.home_button.counter.is_element_displayed():
self.errors.append('New messages counter is shown on Home button for already seen message')
if chat_element.new_messages_counter.is_element_displayed():
if chat_element.new_messages_counter.text == '1':
self.errors.append('New messages counter is shown on chat element for already seen message')
self.errors.verify_no_errors()

View File

@ -113,9 +113,8 @@ class ChatElement(BaseButton):
# TODO: commented until accessibility-id will be added back
# locator_str = "//*[@content-desc='unread-messages-count-text']"
# self.locator = self.Locator.xpath_selector(parent_locator + locator_str)
locator_str = "/android.view.ViewGroup[2]//android.widget.TextView"
self.locator = self.Locator.xpath_selector(parent_locator + locator_str)
locator_str = "//android.widget.TextView)[last()]"
self.locator = self.Locator.xpath_selector("(" + parent_locator + locator_str)
return UnreadMessagesCountText(self.driver, self.locator.value)