Skip to content

Commit

Permalink
e2e: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yevh-berdnyk committed Apr 3, 2024
1 parent 5ffb139 commit 23a4ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/appium/views/base_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def __init__(self, driver):
# share contact screen
self.show_qr_button = Button(self.driver, accessibility_id="show-qr-button")
self.link_to_profile_button = Button(self.driver, accessibility_id="share-qr-code-info-text")
self.sharing_text_native = Text(self.driver, xpath="//*[@resource-id='android:id/content_preview_text']")

# checkboxes and toggles
self.checkbox_button = CheckBox(self.driver, accessibility_id="checkbox-off")
Expand Down
8 changes: 5 additions & 3 deletions test/appium/views/home_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def __init__(self, driver):
self.mark_all_read_activity_button = Button(self.driver, translation_id="mark-all-notifications-as-read")

# Share tab
self.link_to_profile_button = Button(self.driver, accessibility_id="link-to-profile")
self.link_to_profile_text = Text(self.driver, accessibility_id="share-qr-code-info-text")
self.close_share_tab_button = Button(self.driver, accessibility_id="close-shell-share-tab")

Expand Down Expand Up @@ -562,9 +563,10 @@ def get_contact_rows_count(self):

def get_link_to_profile(self):
self.show_qr_code_button.click()
self.link_to_profile_text.wait_for_visibility_of_element()
self.link_to_profile_text.click()
return self.driver.get_clipboard_text()
self.link_to_profile_button.click()
link_to_profile = self.sharing_text_native.text
self.click_system_back_button()
return link_to_profile

def get_public_key(self):
self.driver.info("Getting public key via Share tab")
Expand Down

0 comments on commit 23a4ec6

Please sign in to comment.