migration to latest appium version
Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
parent
9e8ec6eac7
commit
f6777edbdc
|
@ -29,7 +29,6 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase):
|
|||
self.driver.reset()
|
||||
sign_in.accept_agreements()
|
||||
sign_in.recover_access(passphrase=' '.join(recovery_phrase.values()))
|
||||
home.connection_status.wait_for_invisibility_of_element(30)
|
||||
home.wallet_button.click()
|
||||
wallet.set_up_wallet()
|
||||
address2 = wallet.get_wallet_address()
|
||||
|
|
|
@ -130,6 +130,7 @@ class TestPublicChatSingleDevice(SingleDeviceTestCase):
|
|||
self.errors.append('Message with korean characters is not shown')
|
||||
self.verify_no_errors()
|
||||
|
||||
@marks.skip
|
||||
@marks.testrail_id(5336)
|
||||
@marks.medium
|
||||
def test_user_can_interact_with_public_chat(self):
|
||||
|
|
|
@ -13,11 +13,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
start_new_chat = home_view.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('www.wikipedia.org')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = home_view.get_base_web_view()
|
||||
browsing_view.wait_for_d_aap_to_load()
|
||||
browsing_view = start_new_chat.open_url('www.wikipedia.org')
|
||||
wiki_texts = ['Español', '日本語', 'Français', '中文', 'Português']
|
||||
for wiki_text in wiki_texts:
|
||||
browsing_view.find_text_part(wiki_text, 15)
|
||||
|
@ -28,10 +24,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
start_new_chat = home_view.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('invalid.takoe')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = home_view.get_base_web_view()
|
||||
browsing_view = start_new_chat.open_url('invalid.takoe')
|
||||
browsing_view.find_text_part('Unable to load page')
|
||||
browsing_view.cross_icon.click()
|
||||
if home_view.element_by_text('Browser').is_element_displayed():
|
||||
|
@ -43,10 +36,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
start_new_chat = home_view.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('www.bbc.com')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = home_view.get_base_web_view()
|
||||
browsing_view = start_new_chat.open_url('www.bbc.com')
|
||||
browsing_view.url_edit_box_lock_icon.click()
|
||||
browsing_view.find_full_text(connection_not_secure_text)
|
||||
|
||||
|
@ -56,10 +46,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
start_new_chat = home_view.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('https://www.bbc.com')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = home_view.get_base_web_view()
|
||||
browsing_view = start_new_chat.open_url('https://www.bbc.com')
|
||||
browsing_view.url_edit_box_lock_icon.click()
|
||||
browsing_view.find_full_text(connection_is_secure_text)
|
||||
browsing_view.cross_icon.click()
|
||||
|
@ -76,10 +63,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
start_new_chat = home_view.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('google.com')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = home_view.get_base_web_view()
|
||||
browsing_view = start_new_chat.open_url('google.com')
|
||||
browsing_view.cross_icon.click()
|
||||
home_view.get_chat_with_user('Browser').swipe_and_delete()
|
||||
home_view.relogin()
|
||||
|
@ -92,12 +76,9 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in_view = SignInView(self.driver)
|
||||
home = sign_in_view.create_user()
|
||||
start_new_chat = home.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('google.com')
|
||||
start_new_chat.confirm()
|
||||
start_new_chat.open_url('google.com')
|
||||
browsing_view = start_new_chat.get_base_web_view()
|
||||
browsing_view.wait_for_d_aap_to_load()
|
||||
browsing_view.element_by_text('Google').find_element()
|
||||
browsing_view.element_by_text('Google').wait_for_element(30)
|
||||
|
||||
@marks.testrail_id(5321)
|
||||
@marks.skip
|
||||
|
@ -106,12 +87,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
start_new_chat = home.plus_button.click()
|
||||
start_new_chat.open_d_app_button.click()
|
||||
start_new_chat.enter_url_editbox.set_value('www.wikipedia.org')
|
||||
start_new_chat.confirm()
|
||||
browsing_view = start_new_chat.get_base_web_view()
|
||||
browsing_view.wait_for_d_aap_to_load()
|
||||
|
||||
browsing_view = start_new_chat.open_url('www.wikipedia.org')
|
||||
browsing_view.element_by_text_part('Русский', 'button').click()
|
||||
browsing_view.find_text_part('Избранная статья')
|
||||
browsing_view.browser_previous_page_button.click()
|
||||
|
@ -127,7 +103,6 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
status_test_dapp = sign_in_view.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.transactions_button.click()
|
||||
status_test_dapp.find_full_text('Sign message')
|
||||
status_test_dapp.browser_refresh_page_button.click()
|
||||
|
|
|
@ -61,7 +61,7 @@ class AbstractTestCase:
|
|||
desired_caps['build'] = pytest.config.getoption('build')
|
||||
desired_caps['name'] = test_suite_data.current_test.name
|
||||
desired_caps['platformName'] = 'Android'
|
||||
desired_caps['appiumVersion'] = '1.7.2'
|
||||
desired_caps['appiumVersion'] = '1.9.1'
|
||||
desired_caps['platformVersion'] = '7.1'
|
||||
desired_caps['deviceName'] = 'Android GoogleAPI Emulator'
|
||||
desired_caps['deviceOrientation'] = "portrait"
|
||||
|
@ -90,7 +90,7 @@ class AbstractTestCase:
|
|||
desired_caps['app'] = apk
|
||||
desired_caps['deviceName'] = 'nexus_5'
|
||||
desired_caps['platformName'] = 'Android'
|
||||
desired_caps['appiumVersion'] = '1.7.2'
|
||||
desired_caps['appiumVersion'] = '1.9.1'
|
||||
desired_caps['platformVersion'] = pytest.config.getoption('platform_version')
|
||||
desired_caps['newCommandTimeout'] = 600
|
||||
desired_caps['fullReset'] = False
|
||||
|
|
|
@ -57,13 +57,13 @@ def pytest_addoption(parser):
|
|||
action='store',
|
||||
default='ropsten',
|
||||
help='string; ropsten or rinkeby')
|
||||
|
||||
# message reliability
|
||||
|
||||
parser.addoption('--rerun_count',
|
||||
action='store',
|
||||
default=0,
|
||||
help='How many times tests should be re-run if failed')
|
||||
|
||||
# message reliability
|
||||
|
||||
parser.addoption('--messages_number',
|
||||
action='store',
|
||||
default=20,
|
||||
|
|
|
@ -121,7 +121,8 @@ class HomeView(BaseView):
|
|||
def add_contact(self, public_key):
|
||||
start_new_chat = self.plus_button.click()
|
||||
start_new_chat.start_new_chat_button.click_until_presence_of_element(start_new_chat.public_key_edit_box)
|
||||
start_new_chat.public_key_edit_box.set_value(public_key)
|
||||
start_new_chat.public_key_edit_box.click()
|
||||
start_new_chat.public_key_edit_box.send_keys(public_key)
|
||||
one_to_one_chat = self.get_chat_view()
|
||||
start_new_chat.confirm_until_presence_of_element(one_to_one_chat.chat_message_input)
|
||||
return one_to_one_chat
|
||||
|
@ -149,7 +150,8 @@ class HomeView(BaseView):
|
|||
def join_public_chat(self, chat_name: str):
|
||||
start_new_chat = self.plus_button.click()
|
||||
start_new_chat.join_public_chat_button.click()
|
||||
start_new_chat.chat_name_editbox.set_value(chat_name)
|
||||
start_new_chat.chat_name_editbox.click()
|
||||
start_new_chat.chat_name_editbox.send_keys(chat_name)
|
||||
time.sleep(2)
|
||||
chat_view = self.get_chat_view()
|
||||
start_new_chat.confirm_until_presence_of_element(chat_view.chat_message_input)
|
||||
|
|
|
@ -64,7 +64,8 @@ class AddExistingAccountButton(RecoverAccessButton):
|
|||
class ConfirmPasswordInput(BaseEditBox):
|
||||
def __init__(self, driver):
|
||||
super(ConfirmPasswordInput, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//android.widget.TextView[@text='Confirm']")
|
||||
self.locator = self.Locator.xpath_selector("//android.widget.TextView[@text='Confirm']"
|
||||
"/following-sibling::android.view.ViewGroup/android.widget.EditText")
|
||||
|
||||
|
||||
class NameInput(BaseEditBox):
|
||||
|
|
|
@ -90,3 +90,10 @@ class StartNewChatView(ContactsView):
|
|||
|
||||
def get_username_checkbox(self, username: str):
|
||||
return UsernameCheckbox(self.driver, username)
|
||||
|
||||
def open_url(self, url):
|
||||
self.open_d_app_button.click()
|
||||
self.enter_url_editbox.click()
|
||||
self.enter_url_editbox.send_keys(url)
|
||||
self.confirm()
|
||||
return self.get_base_web_view()
|
||||
|
|
Loading…
Reference in New Issue