Skip to content

Commit

Permalink
Merge pull request #215 from nodlesh/feature/wallet-naming
Browse files Browse the repository at this point in the history
updated wallet naming for android
  • Loading branch information
nodlesh authored Nov 28, 2023
2 parents c1a0c0c + 537ebf3 commit a1f5271
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions aries-mobile-tests/pageobjects/bc_wallet/name_your_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def select_save(self):
raise Exception(f"App not on the {type(self)} page")

# sometimes the save button is hidden by the keyboard, so close the keyboard
self.find_by(self.message_locator).click()
if self.current_platform == "iOS":
self.find_by(self.message_locator).click()

self.find_by(self.save_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()

Expand All @@ -73,7 +74,8 @@ def select_cancel(self):
raise Exception(f"App not on the {type(self)} page")

# sometimes the cancel button is hidden by the keyboard, so close the keyboard
self.find_by(self.message_locator).click()
if self.current_platform == "iOS":
self.find_by(self.message_locator).click()
self.find_by(self.cancel_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()

return self.calling_page
Expand Down
15 changes: 9 additions & 6 deletions aries-mobile-tests/pageobjects/bc_wallet/scan_my_qr_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class ScanMyQRCodePage(BasePage):

# Locators
on_this_page_text_locator = "My QR code"
#back_locator = (AppiumBy.ID, "com.ariesbifold:id/Back")
back_locator = (AppiumBy.ID, "Back")
back_locator = (AppiumBy.ID, "com.ariesbifold:id/Back")
edit_wallet_name_locator = (AppiumBy.ID, "com.ariesbifold:id/EditWalletName")
edit_wallet_name_aid_locator = (AppiumBy.ACCESSIBILITY_ID, "Edit wallet name")
scan_qr_code_locator = (AppiumBy.ID, "com.ariesbifold:id/Scan QR code")
my_qr_code_locator = (AppiumBy.ID, "com.ariesbifold:id/My QR code")
qr_code_locator = (AppiumBy.ID, "com.ariesbifold:id/QRRenderer")
Expand All @@ -27,20 +27,23 @@ def on_this_page(self):


def select_edit_wallet_name(self):
self.find_by(self.edit_wallet_name_locator).click()
if self.current_platform == "iOS":
self.find_by(self.edit_wallet_name_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()
else:
self.find_by(self.edit_wallet_name_aid_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()

# return a new page object for the Edit Wallet Name page
return NameYourWalletPage(self.driver, calling_page=self)


def select_scan_qr_code(self):
self.find_by(self.scan_qr_code_locator).click()
self.find_by(self.scan_qr_code_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()


def select_back(self):
# Don't check if on this page becasue android (unless you scroll back to the top) can't see the App Settings accessibility ID
# if self.on_this_page():
self.find_by(self.back_locator).click()
self.find_by(self.back_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()
from pageobjects.bc_wallet.settings import SettingsPage
return SettingsPage(self.driver)
# else:
Expand All @@ -54,7 +57,7 @@ def get_my_qr_code(self):
return qr_code

def select_my_qr_code(self):
self.find_by(self.my_qr_code_locator).click()
self.find_by(self.my_qr_code_locator, wait_condition=WaitCondition.ELEMENT_TO_BE_CLICKABLE).click()

def get_wallet_name(self):
return self.find_by(self.wallet_name_locator).text

0 comments on commit a1f5271

Please sign in to comment.