chore: update tests
This commit is contained in:
parent
bf666c20f5
commit
f536c3447f
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
from scripts.utils.system_path import SystemPath
|
from scripts.utils.system_path import SystemPath
|
||||||
|
|
|
@ -111,4 +111,4 @@ class BackUpYourSeedPhrasePopUp(BasePopup):
|
||||||
self.confirm_second_word(seed_phrases)
|
self.confirm_second_word(seed_phrases)
|
||||||
self.continue_seed_phrase()
|
self.continue_seed_phrase()
|
||||||
self.set_acknowledge(True)
|
self.set_acknowledge(True)
|
||||||
self.complete_and_delete_seed_phrase().wait_until_hidden()
|
self.complete_and_delete_seed_phrase()
|
||||||
|
|
|
@ -13,4 +13,3 @@ class BasePopup(QObject):
|
||||||
@allure.step('Close')
|
@allure.step('Close')
|
||||||
def close(self):
|
def close(self):
|
||||||
driver.type(self.object, '<Escape>')
|
driver.type(self.object, '<Escape>')
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
import configs
|
import configs
|
||||||
import driver.objects_access
|
import driver
|
||||||
from gui.components.base_popup import BasePopup
|
from gui.components.base_popup import BasePopup
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.check_box import CheckBox
|
from gui.elements.check_box import CheckBox
|
||||||
|
@ -28,13 +28,15 @@ class CategoryPopup(BasePopup):
|
||||||
self._name_text_edit.text = title
|
self._name_text_edit.text = title
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Click checkbox in category popup')
|
@allure.step('Click checkbox in edit category popup')
|
||||||
def click_checkbox_by_index(self, index: int):
|
def click_checkbox_by_index(self, index: int):
|
||||||
checkboxes = []
|
checkboxes = driver.findAllObjects(self._channel_item_checkbox.real_name)
|
||||||
for child in driver.objects_access.walk_children(self._channels_view.object):
|
if len(checkboxes) > 0:
|
||||||
if child.id == 'channelItemCheckbox':
|
for _index, item in enumerate(checkboxes):
|
||||||
checkboxes.append(child)
|
if index == _index:
|
||||||
driver.mouseClick(checkboxes[index])
|
driver.mouseClick(item)
|
||||||
|
else:
|
||||||
|
raise AssertionError('Empty list of channels')
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +52,6 @@ class NewCategoryPopup(CategoryPopup):
|
||||||
if checkbox_state:
|
if checkbox_state:
|
||||||
self._channel_item_checkbox.click()
|
self._channel_item_checkbox.click()
|
||||||
self._create_button.click()
|
self._create_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
||||||
|
|
||||||
class EditCategoryPopup(CategoryPopup):
|
class EditCategoryPopup(CategoryPopup):
|
||||||
|
@ -63,4 +64,3 @@ class EditCategoryPopup(CategoryPopup):
|
||||||
@allure.step('Click save in edit category popup')
|
@allure.step('Click save in edit category popup')
|
||||||
def save(self):
|
def save(self):
|
||||||
self._save_button.click()
|
self._save_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
|
@ -238,5 +238,4 @@ class CreateCommunityPopup(BasePopup):
|
||||||
self.set_intro(intro)
|
self.set_intro(intro)
|
||||||
self.set_outro(outro)
|
self.set_outro(outro)
|
||||||
self._create_community_button.click()
|
self._create_community_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
return CommunityScreen().wait_until_appears()
|
return CommunityScreen().wait_until_appears()
|
||||||
|
|
|
@ -20,4 +20,3 @@ class EditGroupNameAndImagePopup(BasePopup):
|
||||||
@allure.step('Save changes')
|
@allure.step('Save changes')
|
||||||
def save_changes(self):
|
def save_changes(self):
|
||||||
self._save_changes_button.click()
|
self._save_changes_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
|
@ -14,5 +14,4 @@ class LeaveGroupPopup(BasePopup):
|
||||||
@allure.step("Confirm leaving group")
|
@allure.step("Confirm leaving group")
|
||||||
def confirm_leaving(self):
|
def confirm_leaving(self):
|
||||||
self._leave_button.click()
|
self._leave_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ class SendContactRequest(BasePopup):
|
||||||
self._chat_key_text_edit.text = chat_key
|
self._chat_key_text_edit.text = chat_key
|
||||||
self._message_text_edit.text = message
|
self._message_text_edit.text = message
|
||||||
self._send_button.click()
|
self._send_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
||||||
|
|
||||||
class SendContactRequestFromProfile(BasePopup):
|
class SendContactRequestFromProfile(BasePopup):
|
||||||
|
|
|
@ -37,7 +37,6 @@ class SyncNewDevicePopup(BasePopup):
|
||||||
@allure.step('Click done')
|
@allure.step('Click done')
|
||||||
def done(self):
|
def done(self):
|
||||||
self._done_button.click()
|
self._done_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
||||||
@allure.step('Click close')
|
@allure.step('Click close')
|
||||||
def close(self):
|
def close(self):
|
||||||
|
|
|
@ -90,7 +90,6 @@ class AddressPopup(AddSavedAddressPopup):
|
||||||
self.verify_otimism_mainnet_network_tag_present()
|
self.verify_otimism_mainnet_network_tag_present()
|
||||||
self.verify_arbitrum_mainnet_network_tag_present(),
|
self.verify_arbitrum_mainnet_network_tag_present(),
|
||||||
self._save_add_address_button.click()
|
self._save_add_address_button.click()
|
||||||
self.wait_until_hidden()
|
|
||||||
|
|
||||||
|
|
||||||
class EditSavedAddressPopup(AddSavedAddressPopup):
|
class EditSavedAddressPopup(AddSavedAddressPopup):
|
||||||
|
|
|
@ -115,18 +115,20 @@ class QObject:
|
||||||
button or driver.Qt.LeftButton
|
button or driver.Qt.LeftButton
|
||||||
)
|
)
|
||||||
LOG.info('%s: is clicked with Qt.LeftButton', self)
|
LOG.info('%s: is clicked with Qt.LeftButton', self)
|
||||||
LOG.info("Checking if application context is frozen")
|
# LOG.info("Checking if application context is frozen")
|
||||||
|
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if timeout is not None:
|
if timeout is not None:
|
||||||
if not isFrozen(timeout):
|
pass
|
||||||
pass
|
# TODO: enable after fixing https://github.com/status-im/status-desktop/issues/15345
|
||||||
|
# if not isFrozen(timeout):
|
||||||
|
# pass
|
||||||
|
|
||||||
else:
|
# else:
|
||||||
LOG.info("Application context did not respond after click")
|
# LOG.info("Application context did not respond after click")
|
||||||
raise Exception(f'Application UI is not responding within {timeout} second(s)')
|
# raise Exception(f'Application UI is not responding within {timeout} second(s)')
|
||||||
|
|
||||||
@allure.step('Native click {0}')
|
@allure.step('Native click {0}')
|
||||||
def native_mouse_click(
|
def native_mouse_click(
|
||||||
|
|
|
@ -12,7 +12,6 @@ from gui.components.community.invite_contacts import InviteContactsPopup
|
||||||
from gui.components.context_menu import ContextMenu
|
from gui.components.context_menu import ContextMenu
|
||||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||||
from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup
|
|
||||||
from gui.components.splash_screen import SplashScreen
|
from gui.components.splash_screen import SplashScreen
|
||||||
from gui.components.toast_message import ToastMessage
|
from gui.components.toast_message import ToastMessage
|
||||||
from gui.components.online_identifier import OnlineIdentifier
|
from gui.components.online_identifier import OnlineIdentifier
|
||||||
|
@ -176,7 +175,6 @@ class MainWindow(Window):
|
||||||
|
|
||||||
@allure.step('Sign Up user')
|
@allure.step('Sign Up user')
|
||||||
def sign_up(self, user_account: UserAccount = RandomUser()):
|
def sign_up(self, user_account: UserAccount = RandomUser()):
|
||||||
share_updates_popup = ShareUsageDataPopup()
|
|
||||||
BeforeStartedPopUp().get_started()
|
BeforeStartedPopUp().get_started()
|
||||||
welcome_screen = WelcomeToStatusView().wait_until_appears()
|
welcome_screen = WelcomeToStatusView().wait_until_appears()
|
||||||
profile_view = welcome_screen.get_keys().generate_new_keys()
|
profile_view = welcome_screen.get_keys().generate_new_keys()
|
||||||
|
@ -193,19 +191,14 @@ class MainWindow(Window):
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
if share_updates_popup.exists:
|
|
||||||
share_updates_popup.skip()
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Log in user')
|
@allure.step('Log in user')
|
||||||
def log_in(self, user_account: UserAccount):
|
def log_in(self, user_account: UserAccount):
|
||||||
share_updates_popup = ShareUsageDataPopup()
|
|
||||||
LoginView().log_in(user_account)
|
LoginView().log_in(user_account)
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
if share_updates_popup.exists:
|
|
||||||
share_updates_popup.skip()
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Authorize user')
|
@allure.step('Authorize user')
|
||||||
|
|
|
@ -40,7 +40,6 @@ def test_add_generated_account_restart_add_again(
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
authenticate_with_password(user_account)
|
authenticate_with_password(user_account)
|
||||||
account_popup.wait_until_hidden()
|
|
||||||
|
|
||||||
with step('Verify toast message notification when adding account'):
|
with step('Verify toast message notification when adding account'):
|
||||||
assert len(main_screen.wait_for_notification()) == 1, \
|
assert len(main_screen.wait_for_notification()) == 1, \
|
||||||
|
@ -67,7 +66,6 @@ def test_add_generated_account_restart_add_again(
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name2).set_emoji(emoji2).set_color(color2).save_changes()
|
account_popup.set_name(name2).set_emoji(emoji2).set_color(color2).save_changes()
|
||||||
authenticate_with_password(user_account)
|
authenticate_with_password(user_account)
|
||||||
account_popup.wait_until_hidden()
|
|
||||||
|
|
||||||
with step('Verify toast message notification when adding account'):
|
with step('Verify toast message notification when adding account'):
|
||||||
assert len(main_screen.wait_for_notification()) == 1, \
|
assert len(main_screen.wait_for_notification()) == 1, \
|
||||||
|
|
|
@ -38,7 +38,6 @@ def test_delete_generated_account_from_wallet_settings(
|
||||||
with step('Add a new generated account from wallet settings screen'):
|
with step('Add a new generated account from wallet settings screen'):
|
||||||
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save_changes()
|
add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
authenticate_with_password(user_account)
|
authenticate_with_password(user_account)
|
||||||
add_account_popup.wait_until_hidden()
|
|
||||||
|
|
||||||
with step('Open account details view for the generated account'):
|
with step('Open account details view for the generated account'):
|
||||||
account_index = 1
|
account_index = 1
|
||||||
|
|
|
@ -37,7 +37,6 @@ def test_add_edit_delete_generated_account(main_screen: MainWindow, user_account
|
||||||
account_popup = wallet.left_panel.open_add_account_popup()
|
account_popup = wallet.left_panel.open_add_account_popup()
|
||||||
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes()
|
||||||
authenticate_with_password(user_account)
|
authenticate_with_password(user_account)
|
||||||
account_popup.wait_until_hidden()
|
|
||||||
|
|
||||||
with step('Verify toast message notification when adding account'):
|
with step('Verify toast message notification when adding account'):
|
||||||
assert len(main_screen.wait_for_notification()) == 1, \
|
assert len(main_screen.wait_for_notification()) == 1, \
|
||||||
|
|
Loading…
Reference in New Issue