Skip to content

Commit

Permalink
Fix tests and disable non-relevant
Browse files Browse the repository at this point in the history
Signed-off-by: Serhy <[email protected]>
  • Loading branch information
Serhy committed Feb 5, 2020
1 parent f9c15be commit dcfac1c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions test/appium/tests/atomic/account_management/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def test_can_add_existing_ens(self):

@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()
Expand Down Expand Up @@ -392,6 +394,8 @@ def test_log_level_and_fleet(self):

@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()
Expand All @@ -408,6 +412,8 @@ def test_deny_camera_access_changing_profile_photo(self):

@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()
Expand Down
4 changes: 2 additions & 2 deletions test/appium/tests/atomic/chats/test_one_to_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def test_message_marked_as_sent_in_1_1_chat(self):
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])
Expand Down Expand Up @@ -308,7 +308,7 @@ def test_unread_messages_counter_1_1_chat(self):
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()

Expand Down
2 changes: 1 addition & 1 deletion test/appium/tests/atomic/chats/test_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_unread_messages_counter_public_chat(self):
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()

Expand Down
5 changes: 2 additions & 3 deletions test/appium/views/home_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ def __init__(self, driver, parent_locator: str):
# 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)

Expand Down

0 comments on commit dcfac1c

Please sign in to comment.