e2e: nigthly fixes 24.07

This commit is contained in:
Yevheniia Berdnyk 2023-07-24 18:25:36 +03:00
parent 2a8e6cb304
commit 99dc79842d
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
3 changed files with 18 additions and 15 deletions

View File

@ -937,8 +937,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(703086)
def test_community_mark_all_messages_as_read(self):
self.channel_1.click_system_back_button_until_element_is_shown()
self.home_1.communities_tab.click()
self.home_1.jump_to_communities_home()
self.channel_2.click_system_back_button_until_element_is_shown()
self.home_2.communities_tab.click()
self.home_2.get_chat(self.community_name, community=True).click()

View File

@ -68,7 +68,8 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
self.home_2.jump_to_messages_home()
self.home_2.open_activity_center_button.click()
self.home_2.activity_unread_filter_button.click()
if not self.home_2.element_by_text_part(self.home_2.get_translation_by_key("add-me-to-your-contacts")).is_element_displayed(30):
if not self.home_2.element_by_text_part(
self.home_2.get_translation_by_key("add-me-to-your-contacts")).is_element_displayed(30):
self.errors.append(
"Pending contact request is not shown on unread notification element on Activity center!")
self.home_2.close_activity_centre.click()
@ -96,7 +97,7 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
self.home_1.just_fyi("Check that can accept contact request from read notifications")
self.home_1.activity_unread_filter_button.click()
cr_element.swipe_right_on_element()
self.home_1.activity_notification_swipe_button.click()
self.home_1.activity_notification_swipe_button.click_inside_element_by_coordinate(rel_x=0.5, rel_y=0.5)
self.home_1.close_activity_centre.click()
self.home_1.contacts_tab.click()
if not self.home_1.contact_details_row(username=self.username_2).is_element_displayed(20):

View File

@ -1,10 +1,13 @@
from selenium.common.exceptions import NoSuchElementException
import base64
import os
from selenium.common.exceptions import NoSuchElementException
from tests import common_password, appium_root_project_path
from tests.base_test_case import AbstractTestCase
from views.base_element import Button, EditBox, Text
from views.base_view import BaseView
import base64
from tests.base_test_case import AbstractTestCase
class MultiAccountButton(Button):
class Username(Text):
@ -122,7 +125,8 @@ class TermsOfUseLink(Button):
class UserProfileElement(Button):
def __init__(self, driver, username):
self.username = username
super().__init__(driver, xpath="//*[@text='%s']//ancestor::android.view.ViewGroup[@content-desc='profile-card']" % username)
super().__init__(driver,
xpath="//*[@text='%s']//ancestor::android.view.ViewGroup[@content-desc='profile-card']" % username)
def open_user_options(self):
Button(self.driver, xpath='%s//*[@content-desc="profile-card-options"]' % self.locator).click()
@ -197,9 +201,9 @@ class SignInView(BaseView):
self.start_button = Button(self.driver, accessibility_id="welcome-button")
self.use_recovery_phrase_button = Button(self.driver, translation_id="use-recovery-phrase")
self.passphrase_edit_box = EditBox(self.driver, accessibility_id="passphrase-input")
self.show_profiles_button = Button(self.driver, accessibility_id="show-profiles")
self.plus_profiles_button = Button(self.driver, accessibility_id="show-new-account-options")
self.create_new_profile_button = Button(self.driver, accessibility_id="create-new-profile")
self.show_profiles_button = Button(self.driver, accessibility_id="show-profiles")
self.plus_profiles_button = Button(self.driver, accessibility_id="show-new-account-options")
self.create_new_profile_button = Button(self.driver, accessibility_id="create-new-profile")
self.remove_profile_button = Button(self.driver, accessibility_id="remove-profile")
def set_password(self, password: str):
@ -225,7 +229,7 @@ class SignInView(BaseView):
self.generate_keys_button.click_until_presence_of_element(self.profile_your_name_edit_box)
self.set_profile(username)
self.set_password(password)
if self.enable_biometric_maybe_later_button.is_element_displayed(30):
if self.enable_biometric_maybe_later_button.is_element_displayed(10):
self.enable_biometric_maybe_later_button.click()
# self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2"))
# if keycard:
@ -262,7 +266,8 @@ class SignInView(BaseView):
self.continue_button.click_until_presence_of_element(self.profile_your_name_edit_box)
self.set_profile(username, set_image)
self.set_password(password)
self.enable_biometric_maybe_later_button.wait_and_click(30)
if self.enable_biometric_maybe_later_button.is_element_displayed(10):
self.enable_biometric_maybe_later_button.click()
self.identifiers_button.wait_and_click(30)
if enable_notifications:
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
@ -347,5 +352,3 @@ class SignInView(BaseView):
self.driver.info("Getting username card by '%s'" % username)
expected_element = UserProfileElement(self.driver, username)
return expected_element if expected_element.is_element_displayed(10) else self.driver.fail("User is not found!")