Fixed tests and added accessibility id

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2018-09-25 20:12:47 +03:00
parent 6d3ca7f5cd
commit 559b74ba94
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
3 changed files with 6 additions and 5 deletions

View File

@ -90,9 +90,11 @@
[react/view
[icons/icon :icons/arrow-right]]]
[react/touchable-highlight
{:on-press #(re-frame/dispatch [:browser.ui/open-modal-chat-button-pressed (http/url-host url)])}
{:on-press #(re-frame/dispatch [:browser.ui/open-modal-chat-button-pressed (http/url-host url)])
:accessibility-label :modal-chat-button}
[icons/icon :icons/chats]]
[react/touchable-highlight {:on-press #(.reload @webview)}
[react/touchable-highlight {:on-press #(.reload @webview)
:accessibility-label :refresh-page-button}
[icons/icon :icons/refresh]]])
;; should-component-update is called only when component's props are changed,

View File

@ -24,7 +24,7 @@ class TestWalletModal(SingleDeviceTestCase):
if wallet_modal.address_text.text != '0x' + user['address']:
self.errors.append('Wallet address is not shown in wallet modal')
modal_usd_value = wallet_modal.get_usd_total_value()
if modal_usd_value > usd_value * 1.001 or modal_usd_value < usd_value * 0.999:
if modal_usd_value > usd_value * 1.005 or modal_usd_value < usd_value * 0.995:
self.errors.append('Total value in USD is not correct in wallet modal')
if wallet_modal.get_eth_value() != eth_value:
self.errors.append('ETH value is not correct in wallet modal')

View File

@ -40,8 +40,7 @@ class BrowserNextPageButton(BaseButton):
class BrowserRefreshPageButton(BaseButton):
def __init__(self, driver):
super(BrowserRefreshPageButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
"//*[@content-desc='next-page-button']/following-sibling::*/*[@content-desc='icon']")
self.locator = self.Locator.accessibility_id('refresh-page-button')
class WebViewBrowserButton(BaseButton):