e2e: more fixes

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2021-06-30 15:45:15 +02:00
parent b280befe2d
commit 031626aefc
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
10 changed files with 18 additions and 17 deletions

View File

@ -213,6 +213,7 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.medium
def test_create_account_short_and_mismatch_password(self):
sign_in = SignInView(self.driver)
sign_in.accept_tos_checkbox.click()
sign_in.get_started_button.click()
sign_in.generate_key_button.click()
sign_in.next_button.click()

View File

@ -139,6 +139,7 @@ class TestCreateAccount(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
sign_in.just_fyi('Cancel on PIN code setup stage')
sign_in.accept_tos_checkbox.click()
sign_in.get_started_button.click()
sign_in.generate_key_button.click()
username = sign_in.first_username_on_choose_chat_name.text
@ -191,6 +192,7 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.flaky
def test_keycard_interruption_access_key_onboarding_flow(self):
sign_in = SignInView(self.driver)
sign_in.accept_tos_checkbox.click()
sign_in.get_started_button.click()
sign_in.access_key_button.click()

View File

@ -338,14 +338,14 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
no_link_found_error_msg = 'Could not find privacy policy link at'
no_link_open_error_msg = 'Could not open our privacy policy from'
signin.just_fyi("Checking provacy policy from sign in and from profile")
signin.just_fyi("Checking privacy policy from sign in and from profile")
if not signin.privacy_policy_link.is_element_displayed():
self.driver.fail('%s Sign in view!' % no_link_found_error_msg)
web_page = signin.privacy_policy_link.click()
web_page.open_in_webview()
if not web_page.policy_summary.is_element_displayed():
self.errors.append('%s Sign in view!' % no_link_open_error_msg)
web_page.click_system_back_button()
web_page.close_privacy_policy_button.click()
home = signin.create_user()
profile = home.profile_button.click()
profile.about_button.click()

View File

@ -148,8 +148,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
send_message = chat_2_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
[message.transaction_status.wait_for_element_text(message.pending, wait_time=60) for message in
(chat_2_sender_message, chat_1_request_message)]
chat_2_sender_message.transaction_status.wait_for_element_text(chat_2_sender_message.pending, wait_time=60)
# TODO: blocked because of #12256
# home_2.just_fyi('Check that transaction message is updated with new status after offline')

View File

@ -143,8 +143,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
send_message = chat_2_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction(keycard=True)
[message.transaction_status.wait_for_element_text(message.pending, wait_time=60) for message in
(chat_2_sender_message, chat_1_request_message)]
chat_2_sender_message.transaction_status.wait_for_element_text(chat_2_sender_message.pending, wait_time=60)
# TODO: blocked because of #12256
# home_2.just_fyi('Check that transaction message is updated with new status after offline')

View File

@ -13,6 +13,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
sender = transaction_senders['K']
home = SignInView(self.driver).recover_access(sender['passphrase'], unique_password)
wallet = home.wallet_button.click()
wallet.scan_tokens()
initial_amount_STT = wallet.get_asset_amount_by_name('STT')
status_test_dapp = home.open_status_test_dapp()
status_test_dapp.wait_for_d_aap_to_load()
@ -22,7 +23,6 @@ class TestTransactionDApp(SingleDeviceTestCase):
self.driver.fail('It seems onboarding screen is not shown.')
home.ok_got_it_button.click()
home.cancel_button.click()
#wallet.dapp_tab_button.click(desired_element_text='Request STT')
send_transaction = status_test_dapp.request_stt_button.click()
send_transaction.sign_transaction(unique_password)
status_test_dapp.wallet_button.click()

View File

@ -15,7 +15,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
home_view = sign_in_view.recover_access(sender['passphrase'], keycard=True)
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.asset_by_name('STT').wait_for_element(30)
wallet_view.scan_tokens()
initial_amount_STT = wallet_view.get_asset_amount_by_name('STT')
status_test_dapp = home_view.open_status_test_dapp()
status_test_dapp.wait_for_d_aap_to_load()

View File

@ -85,7 +85,7 @@ class KeycardKeyStorageButton(Button):
class PrivacyPolicyLink(Button):
def __init__(self, driver):
super(PrivacyPolicyLink, self).__init__(driver, xpath="//*[contains(@text, 'privacy policy')]")
super(PrivacyPolicyLink, self).__init__(driver, xpath="//*[contains(@text, 'Privacy policy')]")
def click(self):
element = self.find_element()

View File

@ -152,11 +152,11 @@ class WalletView(BaseView):
if counter >= wait_time:
self.driver.fail('Balance %s %s is not changed during %s seconds!' % (asset, initial_balance,wait_time))
elif self.asset_by_name(asset).is_element_present() and self.get_asset_amount_by_name(asset) == initial_balance:
# if not self.transaction_history_button.is_element_displayed():
# self.wallet_account_by_name(self.status_account_name).click()
# if (counter/60).is_integer():
# self.pull_to_refresh()
# counter+=20
if not self.transaction_history_button.is_element_displayed():
self.wallet_account_by_name(self.status_account_name).click()
if (counter/60).is_integer():
self.pull_to_refresh()
counter+=20
self.wallet_button.double_click()
counter += 10
time.sleep(10)
@ -170,7 +170,7 @@ class WalletView(BaseView):
self.driver.info('*Waiting %s seconds for %s to display asset*' % (counter, asset))
else:
self.driver.info('**Balance is updated!**')
# self.wallet_button.double_click()
self.wallet_button.double_click()
self.element_by_translation_id("wallet-total-value").scroll_to_element(direction='up')
return self

View File

@ -10,7 +10,7 @@ class BaseWebView(BaseView):
self.progress_bar_icon = Button(self.driver, xpath="//android.widget.ProgressBar")
self.url_edit_box_lock_icon = Button(self.driver, xpath="'(//android.view.ViewGroup[@content-desc='icon'])[2]")
self.policy_summary = Button(self.driver, xpath="//*[@content-desc='Policy summary'] | //*[@text='Policy summary']")
self.policy_summary = Button(self.driver, xpath="//*[@content-desc='Status Privacy Policy'] | //*[@text='Status Privacy Policyy']")
self.browser_previous_page_button = Button(self.driver, accessibility_id="previous-page-button")
self.browser_next_page_button = Button(self.driver, accessibility_id="next-page-button")
@ -29,7 +29,7 @@ class BaseWebView(BaseView):
self.close_all_button = Button(self.driver, accessibility_id="close-all")
self.empty_tab_button = Button(self.driver, accessibility_id="tab-itemEmpty tab")
self.camera_image_in_dapp = BaseElement(self.driver, class_name="android.widget.Image")
self.close_privacy_policy_button = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
# bookmarks management
self.add_remove_favorites_button = Button(self.driver, accessibility_id="add-remove-fav")