Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: fix for wallet amount input #19793

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/appium/views/wallet_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ def confirm_transaction(self):
self.slide_and_confirm_with_password()
self.done_button.click()

def set_amount(self, amount: float):
for i in '{:f}'.format(amount).rstrip('0'):
Button(self.driver, accessibility_id='keyboard-key-%s' % i).click()

def send_asset(self, address: str, asset_name: str, amount: float):
self.send_button.click()
self.address_text_input.send_keys(address)
self.continue_button.click_until_presence_of_element(self.collectibles_tab)
self.select_asset(asset_name).click()
self.amount_input.send_keys('{:f}'.format(amount).rstrip('0'))
self.set_amount(amount)
self.confirm_transaction()

def send_asset_from_drawer(self, address: str, asset_name: str, amount: float):
Expand All @@ -99,7 +103,7 @@ def send_asset_from_drawer(self, address: str, asset_name: str, amount: float):
self.send_button.find_elements()[0].click()
self.address_text_input.send_keys(address)
self.continue_button.click_until_presence_of_element(self.confirm_button)
self.amount_input.send_keys('{:f}'.format(amount).rstrip('0'))
self.set_amount(amount)
self.confirm_transaction()

def add_regular_account(self, account_name: str):
Expand Down