diff --git a/ci/Jenkinsfile.tests-e2e b/ci/Jenkinsfile.tests-e2e index fdbcd77be3b..e7fd40a56a5 100644 --- a/ci/Jenkinsfile.tests-e2e +++ b/ci/Jenkinsfile.tests-e2e @@ -70,6 +70,8 @@ pipeline { PYTHONPATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/lib/python:${PYTHONPATH}" LD_LIBRARY_PATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/python3/lib:${LD_LIBRARY_PATH}" + FLAG_ONBOARDING_V2_ENABLED = "true" + /* To stop e2e tests using port 8545 */ STATUS_RUNTIME_HTTP_API = 'False' STATUS_RUNTIME_WS_API = 'False' @@ -172,7 +174,7 @@ pipeline { ]) { /* Keep the --reruns flag first, or it won't work */ sh """ - python3 -m pytest -m "not keycard" -v --reruns=1 --timeout=240 ${flags.join(" ")} \ + python3 -m pytest -m "not keycard" -v --timeout=240 ${flags.join(" ")} \ --disable-warnings \ --alluredir=./allure-results \ -o timeout_func_only=true diff --git a/test/e2e/README.md b/test/e2e/README.md index 3b8edda65f5..ca7eefea228 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -5,8 +5,6 @@ 1. **MacOS**: https://www.notion.so/Mac-arch-x64-and-Intel-50ea48dae1d4481b882afdbfad38e95a 2. **Linux**: https://www.notion.so/Linux-21f7abd2bb684a0fb10057848760a889 3. **Windows**: https://www.notion.so/Windows-fbccd2b09b784b32ba4174233d83878d - -**NOTE:** when MacOS and Linux are proven to be working, Windows guide could be outdated (no one yet set up Windows) ## Which build to use @@ -45,7 +43,7 @@ expected to fail in report with a reference to the ticket. At the same time, if it will be shown as XPASS (unexpectedly passing) in report, which will indicate the initial bug is gone - `skip`, used to just skip tests for various reasons, normally with a ticket linked - `flaky`, used to mark the tests that are normally passing but sometimes fail. If such test passes, then -if will be shown as passed in report normally. If the test fails, then the total run wont be failed, but +if will be shown as passed in report normally. If the test fails, then the total run won't be failed, but the corresponding test will be marked as `xfail` in the report. It is done for a few tests that are not super stable yet, but passes most of the time. This mark should be used with caution and in case of real need only. - `timeout(timeout=180, method="thread")`, to catch excessively long test durations like deadlocked or hanging tests. diff --git a/test/e2e/configs/__init__.py b/test/e2e/configs/__init__.py index d1257cf2f5c..63af3a0f1ee 100644 --- a/test/e2e/configs/__init__.py +++ b/test/e2e/configs/__init__.py @@ -1,5 +1,4 @@ import logging -import os from os import path from scripts.utils.system_path import SystemPath diff --git a/test/e2e/configs/timeouts.py b/test/e2e/configs/timeouts.py index dc46b771080..ba1657e5ec6 100644 --- a/test/e2e/configs/timeouts.py +++ b/test/e2e/configs/timeouts.py @@ -1,4 +1,4 @@ -# Timoeuts before raising errors +# Timeouts before raising errors UI_LOAD_TIMEOUT_SEC = 5 UI_LOAD_TIMEOUT_MSEC = UI_LOAD_TIMEOUT_SEC * 1000 diff --git a/test/e2e/constants/user.py b/test/e2e/constants/user.py index 466618c9f01..84e6cd761c1 100644 --- a/test/e2e/constants/user.py +++ b/test/e2e/constants/user.py @@ -1,11 +1,8 @@ -import random -import string from collections import namedtuple from dataclasses import dataclass, field from typing import Optional import configs -from constants import ColorCodes from scripts.tools.image import Image from scripts.utils.generators import random_name_string, random_password_string, random_community_name, \ random_community_description, random_community_introduction, random_community_leave_message, random_community_tags, \ diff --git a/test/e2e/driver/aut.py b/test/e2e/driver/aut.py index 526730a8e37..cddf99eda51 100644 --- a/test/e2e/driver/aut.py +++ b/test/e2e/driver/aut.py @@ -1,4 +1,3 @@ -import os import time import allure @@ -48,28 +47,39 @@ def __enter__(self): def __exit__(self, exc_type, exc_value, traceback): if exc_type: - try: - self.attach() - driver.waitForObjectExists(statusDesktop_mainWindow).setVisible(True) - configs.testpath.TEST.mkdir(parents=True, exist_ok=True) - screenshot = configs.testpath.TEST / f'{self.aut_id}.png' - - rect = driver.object.globalBounds(driver.waitForObject(statusDesktop_mainWindow)) - img = ImageGrab.grab( - bbox=(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height), - xdisplay=configs.system.DISPLAY if get_platform() == "Linux" else None) - view = cv2.cvtColor(np.array(img), cv2.COLOR_BGR2RGB) - cv2.imwrite(str(screenshot), view) - - allure.attach( - name=f'Screenshot on fail: {self.aut_id}', - body=screenshot.read_bytes(), - attachment_type=allure.attachment_type.PNG) - except Exception as err: - LOG.error(err) - + self._capture_screenshot() self.stop() + def _capture_screenshot(self): + """Captures a screenshot of the main application window if it is still running.""" + try: + if driver.isRunning(self.aut_id): # Проверяем, работает ли приложение + main_window = driver.waitForObjectExists(statusDesktop_mainWindow, 500) + if main_window: + rect = driver.object.globalBounds(main_window) + screenshot = configs.testpath.TEST / f'{self.aut_id}.png' + configs.testpath.TEST.mkdir(parents=True, exist_ok=True) + + img = ImageGrab.grab( + bbox=(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height), + xdisplay=configs.system.DISPLAY if get_platform() == "Linux" else None + ) + view = cv2.cvtColor(np.array(img), cv2.COLOR_BGR2RGB) + cv2.imwrite(str(screenshot), view) + + allure.attach( + name=f'Screenshot on fail: {self.aut_id}', + body=screenshot.read_bytes(), + attachment_type=allure.attachment_type.PNG + ) + LOG.info(f"Screenshot saved at {screenshot}") + else: + LOG.warning("Main window not found; skipping screenshot.") + else: + LOG.warning("Application is no longer running; skipping screenshot.") + except Exception as err: + LOG.error(f"Failed to capture screenshot: {err}") + def detach_context(self): if self.ctx is None: return @@ -121,8 +131,8 @@ def startaut(self): def stop(self): LOG.info('Stopping AUT: %s', self.path) self.detach_context() + time.sleep(2) # some time before kiling process, to allow screenshot capturing local_system.kill_process(self.pid) - time.sleep(1) # FIXME: Implement waiting for process to actually exit. @allure.step("Start and attach AUT") def launch(self) -> 'AUT': diff --git a/test/e2e/fixtures/aut.py b/test/e2e/fixtures/aut.py index 015aed88e40..c0b40df5684 100644 --- a/test/e2e/fixtures/aut.py +++ b/test/e2e/fixtures/aut.py @@ -4,12 +4,10 @@ import pytest import logging import constants -from configs import get_platform from constants.user import * from driver.aut import AUT from gui.main_window import MainWindow from scripts.utils import system_path -from scripts.utils.local_system import get_pid_by_process_name, kill_process from scripts.utils.system_path import SystemPath LOG = logging.getLogger(__name__) diff --git a/test/e2e/fixtures/squish.py b/test/e2e/fixtures/squish.py index 1cd86a0596f..a0b2eeaf263 100644 --- a/test/e2e/fixtures/squish.py +++ b/test/e2e/fixtures/squish.py @@ -1,4 +1,3 @@ -import allure import pytest import logging diff --git a/test/e2e/gui/components/activity_center.py b/test/e2e/gui/components/activity_center.py index 6f3af619d59..0bc88c9de3a 100644 --- a/test/e2e/gui/components/activity_center.py +++ b/test/e2e/gui/components/activity_center.py @@ -81,14 +81,12 @@ def click_activity_center_button(self, text: str): def find_contact_request_in_list( self, contact: str, timeout_sec: int = configs.timeouts.MESSAGING_TIMEOUT_SEC): started_at = time.monotonic() - request = None - while request is None: + while time.monotonic() - started_at < timeout_sec: requests = self.contact_items for _request in requests: if _request.contact_request == contact: - request = _request - assert time.monotonic() - started_at < timeout_sec, f'Contact: {contact} not found in {requests}' - return request + return _request + raise TimeoutError(f'Timed out after {timeout_sec} seconds: Contact request "{contact}" not found.') @allure.step('Accept contact request') def accept_contact_request(self, request): diff --git a/test/e2e/gui/components/change_password_popup.py b/test/e2e/gui/components/change_password_popup.py index adc78c8cfb8..b2deb587cda 100644 --- a/test/e2e/gui/components/change_password_popup.py +++ b/test/e2e/gui/components/change_password_popup.py @@ -1,5 +1,3 @@ -import allure - import driver from constants.settings import PasswordView from gui.components.base_popup import BasePopup diff --git a/test/e2e/gui/components/community/community_channel_popups.py b/test/e2e/gui/components/community/community_channel_popups.py index 897ca6fd86b..b458682cd29 100644 --- a/test/e2e/gui/components/community/community_channel_popups.py +++ b/test/e2e/gui/components/community/community_channel_popups.py @@ -6,7 +6,6 @@ from gui.elements.check_box import CheckBox from gui.elements.text_edit import TextEdit from gui.objects_map import names -from gui.screens.community_settings import PermissionsSettingsView class ChannelPopup(BasePopup): diff --git a/test/e2e/gui/components/community/leave_community_confirmation.py b/test/e2e/gui/components/community/leave_community_confirmation.py index 0ce4bd12da3..5cdb121bfa8 100644 --- a/test/e2e/gui/components/community/leave_community_confirmation.py +++ b/test/e2e/gui/components/community/leave_community_confirmation.py @@ -1,5 +1,3 @@ -import allure - from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.objects_map import communities_names diff --git a/test/e2e/gui/components/community/new_permission_popup.py b/test/e2e/gui/components/community/new_permission_popup.py index f25dd9f1a80..0e0cd053968 100644 --- a/test/e2e/gui/components/community/new_permission_popup.py +++ b/test/e2e/gui/components/community/new_permission_popup.py @@ -1,8 +1,4 @@ import allure - -import configs -import driver -from driver.objects_access import walk_children from gui.elements.button import Button from gui.elements.check_box import CheckBox from gui.elements.object import QObject diff --git a/test/e2e/gui/components/community/tags_select_popup.py b/test/e2e/gui/components/community/tags_select_popup.py index 64fb4afede9..9109abd9e78 100644 --- a/test/e2e/gui/components/community/tags_select_popup.py +++ b/test/e2e/gui/components/community/tags_select_popup.py @@ -9,7 +9,6 @@ from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.elements.object import QObject -from gui.elements.text_edit import TextEdit from gui.objects_map import names diff --git a/test/e2e/gui/components/context_menu.py b/test/e2e/gui/components/context_menu.py index ac0d05ff108..0773e35e66c 100644 --- a/test/e2e/gui/components/context_menu.py +++ b/test/e2e/gui/components/context_menu.py @@ -1,6 +1,6 @@ import allure -from gui.components.community.community_category_popup import CategoryPopup, EditCategoryPopup +from gui.components.community.community_category_popup import EditCategoryPopup from gui.components.community.invite_contacts import InviteContactsPopup from gui.components.community.leave_community_confirmation import LeaveCommunityConfirmationPopup from gui.components.delete_popup import DeleteCategoryPopup diff --git a/test/e2e/gui/components/messaging/link_preview_options_popup.py b/test/e2e/gui/components/messaging/link_preview_options_popup.py index f4accb302fc..fbdaeab84b3 100644 --- a/test/e2e/gui/components/messaging/link_preview_options_popup.py +++ b/test/e2e/gui/components/messaging/link_preview_options_popup.py @@ -2,7 +2,6 @@ import configs from gui.components.base_popup import BasePopup -from gui.elements.button import Button from gui.elements.object import QObject from gui.objects_map import names diff --git a/test/e2e/gui/components/onboarding/beta_consent_popup.py b/test/e2e/gui/components/onboarding/beta_consent_popup.py index 80fdd02e63c..077e197eccf 100644 --- a/test/e2e/gui/components/onboarding/beta_consent_popup.py +++ b/test/e2e/gui/components/onboarding/beta_consent_popup.py @@ -1,6 +1,5 @@ import allure -from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.elements.check_box import CheckBox from gui.elements.object import QObject diff --git a/test/e2e/gui/components/onboarding/login_by_syncing_checklist.py b/test/e2e/gui/components/onboarding/login_by_syncing_checklist.py new file mode 100644 index 00000000000..81c5d87f124 --- /dev/null +++ b/test/e2e/gui/components/onboarding/login_by_syncing_checklist.py @@ -0,0 +1,21 @@ +from gui.components.base_popup import BasePopup +from gui.elements.button import Button +from gui.objects_map import onboarding_names +from gui.elements.check_box import CheckBox + + +class LogInBySyncingChecklist(BasePopup): + def __init__(self): + super().__init__() + self.connect_both_devices_option = CheckBox(onboarding_names.connectBothDevicesOption) + self.make_sure_you_are_logged_option = CheckBox(onboarding_names.makeSureYouAreLoggedOption) + self.disable_the_firewall_option = CheckBox(onboarding_names.disableTheFirewallOption) + self.cancel_button = Button(onboarding_names.cancelButton) + self.continue_button = Button(onboarding_names.continueButton) + + def complete(self): + self.connect_both_devices_option.set(True) + self.make_sure_you_are_logged_option.set(True) + self.disable_the_firewall_option.set(True) + assert self.continue_button.is_enabled + self.continue_button.click() \ No newline at end of file diff --git a/test/e2e/gui/components/onboarding/login_users_list_popup.py b/test/e2e/gui/components/onboarding/login_users_list_popup.py new file mode 100644 index 00000000000..4c9a0fb241d --- /dev/null +++ b/test/e2e/gui/components/onboarding/login_users_list_popup.py @@ -0,0 +1,28 @@ +import driver +from gui.components.base_popup import BasePopup +from gui.elements.button import Button +from gui.elements.object import QObject +from gui.objects_map import onboarding_names + + +class OnboardingLoginUsersPopup(BasePopup): + def __init__(self): + super().__init__() + self.user_login_item = QObject(onboarding_names.userLoginItem) + self.create_profile_button = Button(onboarding_names.createProfileButton) + self.login_button = Button(onboarding_names.returningLoginButton) + + def select_user_by_name(self, user_name): + raw_data = driver.findAllObjects(self.user_login_item.real_name) + if not raw_data: + raise ValueError(f"Can't find {user_name} in list of users as the list is empty") + for _user in raw_data: + name_label = str(QObject(_user).object.label) + if name_label == user_name: + try: + QObject(_user).click() + return self + except RuntimeError as e: + raise RuntimeError(f'Could not click user with user name "{user_name}": {e}') + else: + raise ValueError(f'User "{user_name}" was not found') diff --git a/test/e2e/gui/components/onboarding/share_usage_data_popup.py b/test/e2e/gui/components/onboarding/share_usage_data_popup.py index 845611593b7..04093205f25 100644 --- a/test/e2e/gui/components/onboarding/share_usage_data_popup.py +++ b/test/e2e/gui/components/onboarding/share_usage_data_popup.py @@ -1,18 +1,21 @@ -import allure - from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.elements.object import QObject -from gui.objects_map import names +from gui.objects_map import names, onboarding_names -class ShareUsageDataPopup(QObject): +# this is old modal shown on relogin +class ShareUsageDataPopup(BasePopup): def __init__(self): - super().__init__(names.share_usage_data_StatusButton) - self._not_now_button = Button(names.not_now_StatusButton ) - self._share_usage_data_button = Button(names.share_usage_data_StatusButton) + super().__init__() + self.not_now_button = Button(names.not_now_StatusButton) + self.share_usage_data_button = Button(names.share_usage_data_StatusButton) + - @allure.step('Click not now button') - def skip(self): - self._not_now_button.click() +# this is new modal shown for initial onboarding +class HelpUsImproveStatusView(QObject): + def __init__(self): + super().__init__(onboarding_names.helpUsImproveStatusPage) + self.share_usage_data_button = Button(onboarding_names.shareUsageDataButton) + self.not_now_button = Button(onboarding_names.notNowButton) diff --git a/test/e2e/gui/components/online_identifier.py b/test/e2e/gui/components/online_identifier.py index 66796250dd8..df30159d505 100644 --- a/test/e2e/gui/components/online_identifier.py +++ b/test/e2e/gui/components/online_identifier.py @@ -1,10 +1,7 @@ -import time - import allure import pyperclip import configs -import constants import driver from gui.components.profile_popup import ProfilePopup from gui.elements.button import Button diff --git a/test/e2e/gui/components/settings/sync_new_device_popup.py b/test/e2e/gui/components/settings/sync_new_device_popup.py index ce26bec39e9..261b0eccb4c 100644 --- a/test/e2e/gui/components/settings/sync_new_device_popup.py +++ b/test/e2e/gui/components/settings/sync_new_device_popup.py @@ -15,7 +15,7 @@ def __init__(self): self._copy_button = Button(names.copy_SyncCodeStatusButton) self._done_button = Button(names.done_SyncCodeStatusButton) self._sync_code_field = TextEdit(names.syncCodeInput_StatusPasswordInput) - self._close_button = Button(names.close_StatusButton) + self._close_button = Button(names.close_SyncCodeStatusFlatRoundButton) self._error_message = QObject(names.errorView_SyncingErrorMessage) @property diff --git a/test/e2e/gui/components/share_profile_popup.py b/test/e2e/gui/components/share_profile_popup.py index 977b84e55da..683db944d84 100644 --- a/test/e2e/gui/components/share_profile_popup.py +++ b/test/e2e/gui/components/share_profile_popup.py @@ -1,7 +1,6 @@ import allure import configs -import driver from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.elements.object import QObject diff --git a/test/e2e/gui/components/signing_phrase_popup.py b/test/e2e/gui/components/signing_phrase_popup.py index 6211a2b5cb1..2be449ce95e 100644 --- a/test/e2e/gui/components/signing_phrase_popup.py +++ b/test/e2e/gui/components/signing_phrase_popup.py @@ -1,14 +1,14 @@ import allure +from gui.components.base_popup import BasePopup from gui.elements.button import Button -from gui.elements.object import QObject from gui.objects_map import names -class SigningPhrasePopup(QObject): +class SigningPhrasePopup(BasePopup): def __init__(self): - super().__init__(names.signPhrase_Ok_Button) + super().__init__() self.ok_got_it_button = Button(names.signPhrase_Ok_Button) @allure.step('Confirm signing phrase in popup') diff --git a/test/e2e/gui/components/wallet/asset_context_menu_popup.py b/test/e2e/gui/components/wallet/asset_context_menu_popup.py index 8a7082f5a7d..36815926002 100644 --- a/test/e2e/gui/components/wallet/asset_context_menu_popup.py +++ b/test/e2e/gui/components/wallet/asset_context_menu_popup.py @@ -1,9 +1,7 @@ -import time + import allure -import configs -import driver from gui.components.base_popup import BasePopup from gui.components.wallet.send_popup import SendPopup from gui.elements.object import QObject diff --git a/test/e2e/gui/components/wallet/bridge_popup.py b/test/e2e/gui/components/wallet/bridge_popup.py index f259557198e..9bb21ac7f0f 100644 --- a/test/e2e/gui/components/wallet/bridge_popup.py +++ b/test/e2e/gui/components/wallet/bridge_popup.py @@ -2,7 +2,6 @@ import configs.timeouts from gui.components.base_popup import BasePopup -from gui.elements.button import Button from gui.elements.object import QObject from gui.objects_map import names diff --git a/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py b/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py index f07ba8ead78..b8d91fece17 100644 --- a/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py +++ b/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py @@ -1,13 +1,9 @@ -import allure - -import configs from gui.components.base_popup import BasePopup -from gui.elements.button import Button -from gui.elements.check_box import CheckBox -from gui.elements.text_label import TextLabel from gui.objects_map import names from gui.screens.settings_wallet import * -from gui.elements.object import QObject +from gui.elements.button import Button +from gui.elements.text_label import TextLabel +from gui.elements.check_box import CheckBox class RemoveAccountConfirmationSettings(BasePopup): diff --git a/test/e2e/gui/components/wallet/send_popup.py b/test/e2e/gui/components/wallet/send_popup.py index 0933b9defec..a75f3f36369 100644 --- a/test/e2e/gui/components/wallet/send_popup.py +++ b/test/e2e/gui/components/wallet/send_popup.py @@ -5,7 +5,7 @@ import configs.timeouts import driver -from driver.objects_access import wait_for_template, walk_children +from driver.objects_access import walk_children from gui.components.base_popup import BasePopup from gui.components.wallet.token_selector_popup import TokenSelectorPopup from gui.elements.button import Button diff --git a/test/e2e/gui/components/wallet/testnet_mode_popup.py b/test/e2e/gui/components/wallet/testnet_mode_popup.py index 88bd77e6bc0..84286464131 100644 --- a/test/e2e/gui/components/wallet/testnet_mode_popup.py +++ b/test/e2e/gui/components/wallet/testnet_mode_popup.py @@ -1,5 +1,3 @@ -import allure - from gui.components.base_popup import BasePopup from gui.elements.button import Button from gui.objects_map import names diff --git a/test/e2e/gui/components/wallet/token_selector_popup.py b/test/e2e/gui/components/wallet/token_selector_popup.py index 2223e088266..367589d6280 100644 --- a/test/e2e/gui/components/wallet/token_selector_popup.py +++ b/test/e2e/gui/components/wallet/token_selector_popup.py @@ -1,10 +1,4 @@ import random -import time - - -import configs -import driver -from gui.components.base_popup import BasePopup from gui.components.wallet.send_popup import * from gui.elements.button import Button from gui.elements.object import QObject diff --git a/test/e2e/gui/components/wallet/wallet_account_popups.py b/test/e2e/gui/components/wallet/wallet_account_popups.py index 853fd130f9b..681a163b1a9 100644 --- a/test/e2e/gui/components/wallet/wallet_account_popups.py +++ b/test/e2e/gui/components/wallet/wallet_account_popups.py @@ -1,5 +1,3 @@ -import time - import configs.timeouts from constants.wallet import * from gui.screens.settings_keycard import KeycardSettingsView diff --git a/test/e2e/gui/elements/button.py b/test/e2e/gui/elements/button.py index b59d2999dfe..feaab39f474 100644 --- a/test/e2e/gui/elements/button.py +++ b/test/e2e/gui/elements/button.py @@ -1,9 +1,4 @@ import logging -import typing - -import allure - -import driver from gui.elements.object import QObject LOG = logging.getLogger(__name__) diff --git a/test/e2e/gui/elements/object.py b/test/e2e/gui/elements/object.py index 95192880ab1..ef6b19c158e 100644 --- a/test/e2e/gui/elements/object.py +++ b/test/e2e/gui/elements/object.py @@ -6,7 +6,6 @@ import configs import driver -from driver import isFrozen from scripts.tools.image import Image LOG = logging.getLogger(__name__) @@ -22,10 +21,9 @@ def __init__(self, real_name: [str, dict] = None): @allure.step('Get object {0}') def object(self): try: - obj = driver.waitForObject(self.real_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - except LookupError: - raise LookupError(f"Object {self.real_name} was not found within {configs.timeouts.UI_LOAD_TIMEOUT_MSEC}") - return obj + return driver.waitForObject(self.real_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + except LookupError as e: + raise LookupError(f"Object {self.real_name} was not found within {configs.timeouts.UI_LOAD_TIMEOUT_MSEC} ms") from e def set_text_property(self, text): self.object.forceActiveFocus() @@ -94,8 +92,8 @@ def checkState(self) -> int: @allure.step('Get visible {0}') def is_visible(self) -> bool: try: - return driver.waitForObject(self.real_name, 0).visible - except (AttributeError, LookupError, RuntimeError): + return driver.waitForObject(self.real_name, 200).visible + except (LookupError, RuntimeError, AttributeError): return False @property @@ -178,14 +176,19 @@ def right_click( @allure.step('Wait until appears {0}') def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): - assert driver.waitFor(lambda: self.is_visible, timeout_msec), f'Object {self} is not visible' + condition = driver.waitFor(lambda: self.is_visible, timeout_msec) + if not condition: + raise TimeoutError(f'Object {self} is not visible within {timeout_msec} ms') LOG.info('%s: is visible', self) return self @allure.step('Wait until hidden {0}') def wait_until_hidden(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): - assert driver.waitFor(lambda: not self.is_visible, timeout_msec), f'Object {self} is not hidden' + condition = driver.waitFor(lambda: not self.is_visible, timeout_msec) + if not condition: + raise TimeoutError(f'Timeout reached: Object {self} is not hidden within {timeout_msec} ms') LOG.info('%s: is hidden', self) + return self @classmethod def wait_for(cls, condition, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> bool: diff --git a/test/e2e/gui/main_window.py b/test/e2e/gui/main_window.py index 142ce6c6603..39d1395c885 100644 --- a/test/e2e/gui/main_window.py +++ b/test/e2e/gui/main_window.py @@ -6,11 +6,10 @@ import configs import driver -from constants import UserAccount, RandomUser, RandomCommunity, CommunityData +from constants import UserAccount, CommunityData from gui.components.community.invite_contacts import InviteContactsPopup from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup from gui.components.context_menu import ContextMenu -from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.components.splash_screen import SplashScreen @@ -23,8 +22,7 @@ from gui.screens.community import CommunityScreen from gui.screens.community_portal import CommunitiesPortal from gui.screens.messages import MessagesScreen -from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, BiometricsView, LoginView, \ - YourEmojihashAndIdenticonRingView +from gui.screens.onboarding import OnboardingWelcomeToStatusView, ReturningLoginView from gui.screens.settings import SettingsScreen from gui.screens.wallet import WalletScreen from scripts.tools.image import Image @@ -168,54 +166,48 @@ def open_wallet(self, attempts: int = 3) -> WalletScreen: class MainWindow(Window): def __init__(self): - super(MainWindow, self).__init__(names.statusDesktop_mainWindow) + super().__init__(names.statusDesktop_mainWindow) self.left_panel = LeftPanel() - def prepare(self) -> 'Window': - return super().prepare() - - @allure.step('Sign Up user') - def sign_up(self, user_account: UserAccount): - BeforeStartedPopUp().get_started() - welcome_screen = WelcomeToStatusView().wait_until_appears() - profile_view = welcome_screen.get_keys().generate_new_keys() - profile_view.set_display_name(user_account.name) - create_password_view = profile_view.next() - confirm_password_view = create_password_view.create_password(user_account.password) - confirm_password_view.confirm_password(user_account.password) - if configs.system.get_platform() == "Darwin": - BiometricsView().wait_until_appears().prefer_password() - SplashScreen().wait_until_appears().wait_until_hidden() - YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next() - if configs.system.get_platform() == "Darwin": - AllowNotificationsView().start_using_status() - SplashScreen().wait_until_appears().wait_until_hidden() + @allure.step('Create profile') + def create_profile(self, user_account: UserAccount): + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + profile_view = welcome_screen.open_create_your_profile_view() + create_password_view = profile_view.open_password_view() + splash_screen = create_password_view.create_password(user_account.password) + splash_screen.wait_until_appears().wait_until_hidden() if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: BetaConsentPopup().confirm() - assert SigningPhrasePopup().ok_got_it_button.is_visible - SigningPhrasePopup().confirm_phrase() + signing_phrase = SigningPhrasePopup().wait_until_appears() + signing_phrase.confirm_phrase() + # since we now struggle with 3 words names, I need to change display name first + left_panel = LeftPanel() + profile = left_panel.open_settings().left_panel.open_profile_settings() + profile.set_name(user_account.name) + profile.save_changes_button.click() + left_panel.open_wallet() return self @allure.step('Log in user') - def log_in(self, user_account: UserAccount): + def returning_log_in(self, user_account: UserAccount): share_updates_popup = ShareUsageDataPopup() - LoginView().log_in(user_account) + ReturningLoginView().log_in(user_account) SplashScreen().wait_until_appears().wait_until_hidden() if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: BetaConsentPopup().confirm() + if share_updates_popup.is_visible: + share_updates_popup.not_now_button.click() if SigningPhrasePopup().is_visible: SigningPhrasePopup().confirm_phrase() - if share_updates_popup.is_visible: - share_updates_popup.skip() return self @allure.step('Authorize user') def authorize_user(self, user_account) -> 'MainWindow': assert isinstance(user_account, UserAccount) - if LoginView().is_visible: - return self.log_in(user_account) + if ReturningLoginView().is_visible: + return self.returning_log_in(user_account) else: - return self.sign_up(user_account) + return self.create_profile(user_account) @allure.step('Create community') def create_community(self, community_data: CommunityData) -> CommunityScreen: @@ -226,12 +218,14 @@ def create_community(self, community_data: CommunityData) -> CommunityScreen: return app_screen @allure.step('Wait for notification and get text') - def wait_for_notification(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> list[str]: - started_at = time.monotonic() - while True: + def wait_for_notification(self, timeout_sec: int = configs.timeouts.UI_LOAD_TIMEOUT_SEC) -> list[str]: + start_time = time.monotonic() + + while time.monotonic() - start_time < timeout_sec: try: return ToastMessage().get_toast_messages() except LookupError as err: - LOG.info(err) - if time.monotonic() - started_at > timeout_msec: - raise LookupError(f'Notifications are not found') + LOG.info(f"Notification not found: {err}") + time.sleep(0.1) # Small delay to prevent CPU overuse + + raise LookupError("Notifications were not found within the timeout period.") diff --git a/test/e2e/gui/objects_map/names.py b/test/e2e/gui/objects_map/names.py index 187c7039042..5a1a8d858b3 100644 --- a/test/e2e/gui/objects_map/names.py +++ b/test/e2e/gui/objects_map/names.py @@ -13,7 +13,7 @@ # Common names settingsSave_StatusButton = {"container": statusDesktop_mainWindow, "objectName": "settingsDirtyToastMessageSaveButton", "type": "StatusButton", "visible": True} -mainWindow_Save_changes_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow, "objectName": "settingsDirtyToastMessageSaveButton", "type": "StatusButton", "visible": True} +mainWindow_Save_changes_StatusButton = {"container": statusDesktop_mainWindow, "objectName": "settingsDirtyToastMessageSaveButton", "type": "StatusButton", "visible": True} closeCrossPopupButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerActionsCloseButton", "type": "StatusFlatRoundButton", "visible": True} # Main right panel @@ -254,7 +254,7 @@ selected_tags_text = {"container": statusDesktop_mainWindow_overlay, "type": "StatusBaseText", "unnamed": 1, "visible": True} # Signing phrase popup -signPhrase_Ok_Button = {"container": statusDesktop_mainWindow, "type": "StatusFlatButton", "objectName": "signPhraseModalOkButton", "visible": True} +signPhrase_Ok_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "signPhraseModalOkButton", "type": "StatusFlatButton", "visible": True} # Sign transaction popup cancel_transaction_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "objectName": "cancelButton", "text": "Cancel", "type": "StatusButton", "visible": True} @@ -451,7 +451,7 @@ copy_SyncCodeStatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "syncCodeCopyButton", "type": "StatusButton", "visible": True} done_SyncCodeStatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "syncAnewDeviceNextButton", "type": "StatusButton", "visible": True} syncCodeInput_StatusPasswordInput = {"container": statusDesktop_mainWindow_overlay, "id": "syncCodeInput", "type": "StatusPasswordInput", "unnamed": 1, "visible": True} -close_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "objectName": "syncAnewDeviceNextButton", "type": "StatusButton", "visible": True} +close_SyncCodeStatusFlatRoundButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerActionsCloseButton", "type": "StatusFlatRoundButton", "visible": True} errorView_SyncingErrorMessage = {"container": statusDesktop_mainWindow_overlay, "id": "errorView", "type": "SyncingErrorMessage", "unnamed": 1, "visible": True} # Edit group name and image popup diff --git a/test/e2e/gui/objects_map/onboarding_names.py b/test/e2e/gui/objects_map/onboarding_names.py index 21005242030..6f0ce1e46df 100644 --- a/test/e2e/gui/objects_map/onboarding_names.py +++ b/test/e2e/gui/objects_map/onboarding_names.py @@ -1,7 +1,53 @@ from gui.objects_map.names import statusDesktop_mainWindow, statusDesktop_mainWindow_overlay +# Welcome to status view +startupOnboardingLayout = {"container": statusDesktop_mainWindow, "objectName": "startupOnboardingLayout", "type": "OnboardingLayout", "visible": True} +startupWelcomePage = {"container": startupOnboardingLayout, "type": "WelcomePage", "unnamed": 1, "visible": True} +startupNewsPage = {"container": startupOnboardingLayout, "id": "newsPage", "type": "ColumnLayout", "unnamed": 1, "visible": True} +startupCreateProfileButton = {"container": startupOnboardingLayout, "objectName": "btnCreateProfile", "type": "StatusButton", "visible": True} +startupLoginButton = {"container": startupOnboardingLayout, "objectName": "btnLogin", "type": "StatusButton", "visible": True} +startupApprovalLinks = {"container": startupOnboardingLayout, "objectName": "approvalLinks", "type": "StatusBaseText", "visible": True} + +# Sign in view +enterRecoveryPhraseButton = {"container": startupOnboardingLayout, "objectName": "btnWithSeedphrase", "type": "StatusButton", "visible": True} +logInBySyncingButton = {"container": startupOnboardingLayout, "objectName": "btnBySyncing", "type": "ListItemButton", "visible": True} +logInWithKeycardButton = {"container": startupOnboardingLayout, "objectName": "btnWithKeycard", "type": "ListItemButton", "visible": True} + +# Help us improve status popup +onboardingLayout = {"container": statusDesktop_mainWindow, "objectName": "OnboardingLayout", "type": "ContentItem", "visible": True} +helpUsImproveStatusPage = {"container": onboardingLayout, "type": "HelpUsImproveStatusPage", "unnamed": 1, "visible": True} +shareUsageDataButton = {"container": helpUsImproveStatusPage, "objectName": "btnShare", "type": "StatusButton", "visible": True} +notNowButton = {"container": statusDesktop_mainWindow, "objectName": "btnDontShare", "type": "StatusButton", "visible": True} + +# CreateYourProfileView +onboardingFrame = {"container": onboardingLayout, "type": "OnboardingFrame", "unnamed": 1, "visible": True} +buttonFrame = {"container": onboardingLayout, "id": "buttonFrame", "type": "OnboardingButtonFrame", "unnamed": 1, "visible": True} +startFreshLetsGoButton = {"container": onboardingFrame, "objectName": "btnCreateWithPassword", "type": "StatusButton", "visible": True} +useRecoveryPhraseButton = {"container": buttonFrame, "objectName": "btnCreateWithSeedPhrase", "type": "ListItemButton", "visible": True} +useEmptyKeycardButton = {"container": statusDesktop_mainWindow, "objectName": "btnCreateWithEmptyKeycard", "type": "ListItemButton", "visible": True} + +# Log in by syncing checklist popup +connectBothDevicesOption = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "ack1", "type": "StatusCheckBox", "visible": True} +makeSureYouAreLoggedOption = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "ack2", "type": "StatusCheckBox", "visible": True} +disableTheFirewallOption = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "ack3", "type": "StatusCheckBox", "visible": True} +cancelButton = {"container": statusDesktop_mainWindow_overlay, "type": "StatusFlatButton", "unnamed": 1, "visible": True} +continueButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "btnContinue", "type": "StatusButton", "visible": True} +# ProfileSyncingView +profileSyncedView = {"container": onboardingLayout, "type": "SyncProgressPage", "unnamed": 1, "visible": True} +profileSyncedViewHeader = {"container": profileSyncedView, "type": "StatusBaseText", "unnamed": 1, "visible": True} + +# Onboarding import seed phrase view +onboardingImportSeedPhraseView = {"container": onboardingLayout, "type": "SeedphrasePage", "unnamed": 1, "visible": True} +tab12WordsButton = {"container": onboardingImportSeedPhraseView, "objectName": "12SeedButton", "type": "StatusSwitchTabButton"} +tab18WordsButton = {"container": onboardingImportSeedPhraseView, "objectName": "18SeedButton", "type": "StatusSwitchTabButton"} +tab24WordsButton = {"container": onboardingImportSeedPhraseView, "objectName": "24SeedButton", "type": "StatusSwitchTabButton"} +seedPhraseInputField = {"container": onboardingImportSeedPhraseView, "objectName": "enterSeedPhraseInputField", "type": "TextEdit"} +onboardingImportSeedPhraseContinueButton = {"container": onboardingImportSeedPhraseView, "objectName": "btnContinue", "type": "StatusButton", "visible": True} + # Map for onboarding locators +onboardingBasePage = {"container": statusDesktop_mainWindow, "objectName": "OnboardingBasePage", "type": "ContentItem", "visible": True} +mainWindow_SyncCodeView = {"container": statusDesktop_mainWindow, "type": "SyncCodeView", "unnamed": 1, "visible": True} mainWindow_onboardingBackButton_StatusRoundButton = {"container": statusDesktop_mainWindow, "objectName": "onboardingBackButton", "type": "StatusRoundButton", "visible": True} # Allow Notification View @@ -42,13 +88,15 @@ "visible": True} # SyncCode View -mainWindow_SyncCodeView = {"container": statusDesktop_mainWindow, "type": "SyncCodeView", "unnamed": 1, "visible": True} +logInBySyncingView = {"container": statusDesktop_mainWindow, "type": "LoginBySyncingPage", "unnamed": 1, "visible": True} mainWindow_switchTabBar_StatusSwitchTabBar_2 = {"container": statusDesktop_mainWindow, "id": "switchTabBar", "type": "StatusSwitchTabBar", "unnamed": 1, "visible": True} switchTabBar_Enter_sync_code_StatusSwitchTabButton = {"checkable": True, "container": mainWindow_switchTabBar_StatusSwitchTabBar_2, "objectName": "secondTab_StatusSwitchTabButton", "type": "StatusSwitchTabButton", "visible": True} mainWindow_statusBaseInput_StatusBaseInput = {"container": statusDesktop_mainWindow, "id": "statusBaseInput", "type": "StatusBaseInput", "unnamed": 1, "visible": True} mainWindow_Paste_StatusButton = {"container": statusDesktop_mainWindow, "objectName": "syncCodePasteButton", "type": "StatusButton", "visible": True} mainWindow_syncingEnterCode_SyncingEnterCode = {"container": statusDesktop_mainWindow, "objectName": "syncingEnterCode", "type": "SyncingEnterCode", "visible": True} mainWindow_nameInput_syncingEnterCode_Continue = {"checkable": False, "container": statusDesktop_mainWindow, "objectName": "continue_StatusButton", "type": "StatusButton", "visible": True} +syncCodeInput = {"container": statusDesktop_mainWindow, "objectName": "syncCodeInput", "type": "StatusSyncCodeInput", "visible": True} +syncCodeErrorMessage = {"container": statusDesktop_mainWindow, "id": "errorMessage", "type": "StatusBaseText", "unnamed": 1, "visible": True} # SyncDevice View mainWindow_SyncingDeviceView_found = {"container": statusDesktop_mainWindow, "type": "SyncingDeviceView", "unnamed": 1, "visible": True} @@ -85,9 +133,19 @@ profileImageCropper = {"container": statusDesktop_mainWindow, "objectName": "imageCropWorkflow", "type": "ImageCropWorkflow", "visible": True} # Create Password View +mainWindow_CreatePasswordPage = {"container": onboardingLayout, "type": "CreatePasswordPage", "unnamed": 1, "visible": True} +createPasswordView = {"container": mainWindow_CreatePasswordPage, "id": "passView", "type": "PasswordView", "unnamed": 1, "visible": True} +choosePasswordField = {"container": createPasswordView, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True} +repeatPasswordField = {"container": createPasswordView, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True} +confirmPasswordButton = {"container": mainWindow_CreatePasswordPage, "objectName": "btnConfirmPassword", "type": "StatusButton", "visible": True} +passwordStrengthIndicator = {"container": createPasswordView, "id": "strengthInditactor", "type": "StatusPasswordStrengthIndicator", "unnamed": 1, "visible": True} +passwordComponentIndicator = {"container": createPasswordView, "type": "PasswordComponentIndicator", "unnamed": 1, "visible": True} + mainWindow_CreatePasswordView = {"container": statusDesktop_mainWindow, "type": "CreatePasswordView", "unnamed": 1, "visible": True} mainWindow_passwordViewNewPassword = {"container": mainWindow_CreatePasswordView, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True} mainWindow_passwordViewNewPasswordConfirm = {"container": mainWindow_CreatePasswordView, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True} + + mainWindow_Create_password_StatusButton = {"checkable": False, "container": mainWindow_CreatePasswordView, "objectName": "onboardingCreatePasswordButton", "type": "StatusButton", "visible": True} mainWindow_view_PasswordView = {"container": statusDesktop_mainWindow, "id": "view", "type": "PasswordView", "unnamed": 1, "visible": True} mainWindow_RowLayout = {"container": statusDesktop_mainWindow, "type": "PassIncludesIndicator", "unnamed": 1, "visible": True} @@ -103,7 +161,7 @@ mainWindow_passwordView_PasswordConfirmationView = {"container": statusDesktop_mainWindow, "id": "passwordView", "type": "PasswordConfirmationView", "unnamed": 1, "visible": True} # Login View -mainWindow_LoginView = {"container": statusDesktop_mainWindow, "type": "LoginView", "unnamed": 1, "visible": True} +mainWindow_LoginView = {"container": statusDesktop_mainWindow, "id": "loginScreen", "type": "LoginScreen", "unnamed": 1, "visible": True} loginView_submitBtn = {"container": mainWindow_LoginView, "type": "StatusRoundButton", "visible": True} loginView_passwordInput = {"container": mainWindow_LoginView, "objectName": "loginPasswordInput", "type": "StatusTextField"} loginView_currentUserNameLabel = {"container": mainWindow_LoginView, "objectName": "currentUserNameLabel", "type": "StatusBaseText"} @@ -114,7 +172,20 @@ loginView_addExistingUserItem_AccountMenuItemPanel = {"container": statusDesktop_mainWindow_overlay, "objectName": "LoginView_addExistingUserItem", "type": "AccountMenuItemPanel", "visible": True} mainWindowUsePasswordInsteadStatusBaseText = {"container": statusDesktop_mainWindow, "text": "Use password instead", "type": "StatusBaseText", "unnamed": 1, "visible": True} +# new Login view +userSelectorButton = {"container": mainWindow_LoginView, "id": "userSelectorButton", "type": "LoginUserSelectorDelegate", "unnamed": 1, "visible": True} +userSelectorPanel = {"container": statusDesktop_mainWindow_overlay, "type": "StatusListView", "unnamed": 1, "visible": True} +loginButton = {"container": mainWindow_LoginView, "objectName": "loginButton", "type": "StatusButton", "visible": True} +userLoginItem = {"container": statusDesktop_mainWindow_overlay, "type": "LoginUserSelectorDelegate", "unnamed": 1, "visible": True} +createProfileButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createProfileDelegate", "type": "LoginUserSelectorDelegate", "visible": True} +returningLoginButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "logInDelegate", "type": "LoginUserSelectorDelegate", "visible": True} + # Touch ID Auth View mainWindow_TouchIDAuthView = {"container": statusDesktop_mainWindow, "type": "TouchIDAuthView", "unnamed": 1, "visible": True} mainWindow_touchIdYesUseTouchIDButton = {"container": statusDesktop_mainWindow, "objectName": "touchIdYesUseTouchIDButton", "type": "StatusButton", "visible": True} mainWindow_touchIdIPreferToUseMyPasswordText = {"container": statusDesktop_mainWindow, "objectName": "touchIdIPreferToUseMyPasswordText", "type": "StatusBaseText"} + +# Enable biometrics view +enableBiometricsView = {"container": onboardingLayout, "type": "EnableBiometricsPage", "unnamed": 1, "visible": True} +enableBiometricsButton = {"container": enableBiometricsView, "objectName": "btnEnableBiometrics", "type": "StatusButton", "visible": True} +dontEnableBiometricsButton = {"container": enableBiometricsView, "objectName": "btnDontEnableBiometrics", "type": "StatusFlatButton", "visible": True} \ No newline at end of file diff --git a/test/e2e/gui/screens/community.py b/test/e2e/gui/screens/community.py index 459c5fdc5d0..67a6b524210 100644 --- a/test/e2e/gui/screens/community.py +++ b/test/e2e/gui/screens/community.py @@ -8,12 +8,12 @@ import driver from constants import CommunityChannel from driver.objects_access import walk_children -from gui.components.community.community_category_popup import NewCategoryPopup, EditCategoryPopup, CategoryPopup +from gui.components.community.community_category_popup import NewCategoryPopup from gui.components.community.community_channel_popups import EditChannelPopup, NewChannelPopup from gui.components.community.invite_contacts import InviteContactsPopup from gui.components.community.welcome_community import WelcomeCommunityPopup from gui.components.context_menu import ContextMenu -from gui.components.delete_popup import DeletePopup, DeleteCategoryPopup +from gui.components.delete_popup import DeletePopup from gui.components.profile_popup import ProfilePopupFromMembers from gui.elements.button import Button from gui.elements.list import List diff --git a/test/e2e/gui/screens/community_settings_tokens.py b/test/e2e/gui/screens/community_settings_tokens.py index c1d4cf97582..3ab719348d7 100644 --- a/test/e2e/gui/screens/community_settings_tokens.py +++ b/test/e2e/gui/screens/community_settings_tokens.py @@ -1,4 +1,3 @@ -import time import typing import allure diff --git a/test/e2e/gui/screens/onboarding.py b/test/e2e/gui/screens/onboarding.py index d0cb85825c7..012f276d0de 100755 --- a/test/e2e/gui/screens/onboarding.py +++ b/test/e2e/gui/screens/onboarding.py @@ -2,7 +2,6 @@ import pathlib import time import typing -from abc import abstractmethod import allure @@ -13,7 +12,9 @@ from constants import ColorCodes from driver.objects_access import walk_children from gui.components.onboarding.keys_already_exist_popup import KeysAlreadyExistPopup -from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup +from gui.components.onboarding.login_by_syncing_checklist import LogInBySyncingChecklist +from gui.components.onboarding.login_users_list_popup import OnboardingLoginUsersPopup +from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup, HelpUsImproveStatusView from gui.components.os.open_file_dialogs import OpenFileDialog from gui.components.picture_edit_popup import PictureEditPopup from gui.components.splash_screen import SplashScreen @@ -42,7 +43,6 @@ def start_using_status(self): class WelcomeToStatusView(QObject): - def __init__(self): super(WelcomeToStatusView, self).__init__(onboarding_names.mainWindow_WelcomeView) self._i_am_new_to_status_button = Button(onboarding_names.mainWindow_I_am_new_to_Status_StatusBaseText) @@ -52,15 +52,61 @@ def __init__(self): def get_keys(self) -> 'KeysView': self._i_am_new_to_status_button.click() time.sleep(1) - ShareUsageDataPopup().skip() + ShareUsageDataPopup().not_now_button.click() return KeysView().wait_until_appears() - @allure.step('Open Sign by syncing form') - def sync_existing_user(self) -> 'SignBySyncingView': + def sync_existing_user(self) -> 'SignInBySyncingView': self._i_already_use_status_button.click() time.sleep(1) - ShareUsageDataPopup().skip() - return SignBySyncingView().wait_until_appears() + ShareUsageDataPopup().not_now_button.click() + return SignInBySyncingView().wait_until_appears() + + +class OnboardingWelcomeToStatusView(QObject): + + def __init__(self): + super().__init__(onboarding_names.startupOnboardingLayout) + self.create_profile_button = Button(onboarding_names.startupCreateProfileButton) + self.log_in_button = Button(onboarding_names.startupLoginButton) + self.approval_links = QObject(onboarding_names.startupApprovalLinks) + + @allure.step('Open Create your profile view') + def open_create_your_profile_view(self) -> 'CreateYourProfileViewOnboarding': + self.create_profile_button.click() + HelpUsImproveStatusView().not_now_button.click() + return CreateYourProfileViewOnboarding().wait_until_appears() + + @allure.step('Open Sign by syncing form') + def sync_existing_user(self) -> 'OnboardingSyncCodeView': + self.log_in_button.click() + HelpUsImproveStatusView().wait_until_appears().not_now_button.click() + OnboardingLogIn().wait_until_appears().log_in_by_syncing_button.click() + LogInBySyncingChecklist().wait_until_appears().complete() + return OnboardingSyncCodeView().wait_until_appears() + + +class CreateYourProfileViewOnboarding(OnboardingWelcomeToStatusView): + def __init__(self): + super().__init__() + self.lets_go_button = Button(onboarding_names.startFreshLetsGoButton) + self.use_a_recovery_phrase_button = Button(onboarding_names.useRecoveryPhraseButton) + self.use_an_empty_keycard_button = Button(onboarding_names.useEmptyKeycardButton) + + def open_password_view(self): + self.lets_go_button.click() + return OnboardingCreatePasswordView() + + def open_seed_phrase_view(self): + self.use_a_recovery_phrase_button.click() + return OnboardingImportSeedPhraseView() + + +class OnboardingLogIn(OnboardingWelcomeToStatusView): + def __init__(self): + super().__init__() + self.enter_recovery_phrase_button = Button(onboarding_names.enterRecoveryPhraseButton) + self.log_in_by_syncing_button = Button(onboarding_names.logInBySyncingButton) + self.log_in_with_keycard_button = Button(onboarding_names.logInWithKeycardButton) class OnboardingView(QObject): @@ -100,9 +146,9 @@ def open_enter_seed_phrase_view(self) -> 'ImportSeedPhraseView': return SeedPhraseInputView().wait_until_appears() @allure.step('Go back') - def back(self) -> WelcomeToStatusView: + def back(self) -> OnboardingWelcomeToStatusView: self._back_button.click() - return WelcomeToStatusView().wait_until_appears() + return OnboardingWelcomeToStatusView().wait_until_appears() class ImportSeedPhraseView(OnboardingView): @@ -123,10 +169,9 @@ def back(self) -> KeysView: return KeysView().wait_until_appears() -class SignBySyncingView(OnboardingView): - +class SignInBySyncingView(QObject): def __init__(self): - super(SignBySyncingView, self).__init__(onboarding_names.mainWindow_KeysMainView) + super().__init__(onboarding_names.onboardingBasePage) self._scan_or_enter_sync_code_button = Button(onboarding_names.keysMainView_PrimaryAction_Button) self._i_dont_have_other_device_button = Button( onboarding_names.mainWindow_iDontHaveOtherDeviceButton_StatusBaseText) @@ -134,7 +179,7 @@ def __init__(self): @allure.step('Open sync code view') def open_sync_code_view(self): self._scan_or_enter_sync_code_button.click() - return SyncCodeView().wait_until_appears() + return OnboardingSyncCodeView().wait_until_appears() @allure.step('Open keys view') def open_keys_view(self): @@ -142,6 +187,31 @@ def open_keys_view(self): return KeysView().wait_until_appears() +class OnboardingSyncCodeView(QObject): + + def __init__(self): + super(OnboardingSyncCodeView, self).__init__(onboarding_names.logInBySyncingView) + self.enter_sync_code_button = Button(onboarding_names.switchTabBar_Enter_sync_code_StatusSwitchTabButton) + self.paste_sync_code_button = Button(onboarding_names.mainWindow_Paste_StatusButton) + self.syncing_enter_code_item = QObject(onboarding_names.mainWindow_syncingEnterCode_SyncingEnterCode) + self.continue_button = Button(onboarding_names.mainWindow_nameInput_syncingEnterCode_Continue) + self.sync_code_error_message = QObject(onboarding_names.syncCodeErrorMessage) + + @allure.step('Open enter sync code form') + def open_enter_sync_code_form(self): + self.enter_sync_code_button.click() + return self + + @allure.step('Paste sync code') + def click_paste_button(self): + self.paste_sync_code_button.click() + + @property + @allure.step('Get wrong sync code message') + def get_sync_code_error_message(self) -> str: + return str(self.sync_code_error_message.object.text) + + class SyncCodeView(OnboardingView): def __init__(self): @@ -149,7 +219,6 @@ def __init__(self): self._enter_sync_code_button = Button(onboarding_names.switchTabBar_Enter_sync_code_StatusSwitchTabButton) self._paste_sync_code_button = Button(onboarding_names.mainWindow_Paste_StatusButton) self._syncing_enter_code_item = QObject(onboarding_names.mainWindow_syncingEnterCode_SyncingEnterCode) - self.continue_button = Button(onboarding_names.mainWindow_nameInput_syncingEnterCode_Continue) @allure.step('Open enter sync code form') def open_enter_sync_code_form(self): @@ -166,6 +235,20 @@ def sync_code_error_message(self) -> str: return self._syncing_enter_code_item.object.syncCodeErrorMessage +class OnboardingProfileSyncedView(QObject): + def __init__(self): + super().__init__() + self.profile_synced_view = QObject(onboarding_names.profileSyncedView) + self.log_in_button = Button(onboarding_names.startupLoginButton) + self.profile_synced_view_header = QObject(onboarding_names.profileSyncedViewHeader) + + def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): + assert driver.waitFor(lambda: self.profile_synced_view.is_visible, + timeout_msec), f'Object {self} is not visible' + LOG.info('%s: is visible', self) + return self + + class SyncDeviceFoundView(OnboardingView): def __init__(self): @@ -212,6 +295,44 @@ def sign_in(self, attempts: int = 2): self.sign_in(attempts - 1) +class OnboardingImportSeedPhraseView(QObject): + def __init__(self): + super().__init__(onboarding_names.onboardingImportSeedPhraseView) + self.tab_12_words_button = Button(onboarding_names.tab12WordsButton) + self.tab_18_words_button = Button(onboarding_names.tab18WordsButton) + self.tab_24_words_button = Button(onboarding_names.tab24WordsButton) + self.seed_phrase_input_text_edit = TextEdit(onboarding_names.seedPhraseInputField) + self.continue_button = Button(onboarding_names.onboardingImportSeedPhraseContinueButton) + + def fill_in_seed_phrase_grid(self, seed_phrase: typing.List[str], autocomplete: bool): + if len(seed_phrase) == 12: + if not self.tab_12_words_button.is_checked: + self.tab_12_words_button.click() + elif len(seed_phrase) == 18: + if not self.tab_18_words_button.is_checked: + self.tab_18_words_button.click() + elif len(seed_phrase) == 24: + if not self.tab_24_words_button.is_checked: + self.tab_24_words_button.click() + else: + raise RuntimeError("Wrong amount of seed words", len(seed_phrase)) + + for index, word in enumerate(seed_phrase, start=1): + self.seed_phrase_input_text_edit.real_name['objectName'] = f'enterSeedPhraseInputField{index}' + if autocomplete: + word_to_put = word + if len(word) > 4: + word_to_put = word[:-1] + self.seed_phrase_input_text_edit.text = word_to_put + driver.type(self.seed_phrase_input_text_edit.object, "") + else: + self.seed_phrase_input_text_edit.text = word + + def continue_import(self): + self.continue_button.click() + return OnboardingCreatePasswordView() + + class SeedPhraseInputView(OnboardingView): def __init__(self): @@ -348,10 +469,10 @@ def set_user_image(self, fp: SystemPath) -> PictureEditPopup: return PictureEditPopup().wait_until_appears() @allure.step('Open Create Password View') - def next(self, attempts: int = 2) -> 'CreatePasswordView': + def next(self, attempts: int = 2) -> 'OnboardingCreatePasswordView': self._next_button.click() try: - return CreatePasswordView() + return OnboardingCreatePasswordView() except Exception as err: if attempts: return self.next(attempts - 1) @@ -441,7 +562,6 @@ def is_user_image_background_white(self): class CreatePasswordView(OnboardingView): - def __init__(self): super(CreatePasswordView, self).__init__(onboarding_names.mainWindow_CreatePasswordView) self._new_password_text_field = TextEdit(onboarding_names.mainWindow_passwordViewNewPassword) @@ -455,6 +575,26 @@ def __init__(self): self._show_icon = QObject(onboarding_names.mainWindow_show_icon_StatusIcon) self._hide_icon = QObject(onboarding_names.mainWindow_hide_icon_StatusIcon) + @allure.step('Set password in first field') + def set_password_in_first_field(self, value: str): + self._new_password_text_field.text = value + + @allure.step('Set password in confirmation field') + def set_password_in_confirmation_field(self, value: str): + self._confirm_password_text_field.text = value + + @allure.step('Set password and open Confirmation password view') + def create_password(self, value: str) -> 'ConfirmPasswordView': + self.set_password_in_first_field(value) + self.set_password_in_confirmation_field(value) + self.click_create_password() + return ConfirmPasswordView().wait_until_appears() + + def click_create_password(self): + self._create_button.click() + time.sleep(1) + return ConfirmPasswordView().wait_until_appears() + @allure.step('Get password content from first field') def get_password_from_first_field(self) -> str: return str(self._new_password_text_field.object.displayText) @@ -505,30 +645,71 @@ def click_hide_icon(self, index): hide_icons = driver.findAllObjects(self._hide_icon.real_name) driver.mouseClick(hide_icons[index]) - @allure.step('Set password in first field') - def set_password_in_first_field(self, value: str): - self._new_password_text_field.text = value + @allure.step('Go back') + def back(self): + self._back_button.click() + return YourEmojihashAndIdenticonRingView().wait_until_appears() - @allure.step('Set password in confirmation field') - def set_password_in_confirmation_field(self, value: str): - self._confirm_password_text_field.text = value + +class OnboardingCreatePasswordView(OnboardingView): + + def __init__(self): + super(OnboardingCreatePasswordView, self).__init__(onboarding_names.mainWindow_CreatePasswordView) + self.choose_password_field = TextEdit(onboarding_names.choosePasswordField) + self.repeat_password_field = TextEdit(onboarding_names.repeatPasswordField) + self.confirm_password_button = Button(onboarding_names.confirmPasswordButton) + self.create_password_view = QObject(onboarding_names.createPasswordView) + self.password_strength_indicator = QObject(onboarding_names.passwordStrengthIndicator) + self.password_component_indicator = QObject(onboarding_names.passwordComponentIndicator) @allure.step('Set password and open Confirmation password view') - def create_password(self, value: str) -> 'ConfirmPasswordView': + def create_password(self, value: str) -> 'SplashScreen': self.set_password_in_first_field(value) - self.set_password_in_confirmation_field(value) - self.click_create_password() - return ConfirmPasswordView().wait_until_appears() + self.set_password_in_repeat_field(value) + self.confirm_password_button.click() + if configs.system.get_platform() == "Darwin": + assert OnboardingBiometricsView().wait_until_appears().yes_use_biometrics_button.is_visible, f"Use biometrics button is not found" + OnboardingBiometricsView().wait_until_appears().maybe_later() + return SplashScreen() - def click_create_password(self): - self._create_button.click() - time.sleep(1) - return ConfirmPasswordView().wait_until_appears() + @allure.step('Fill in choose password field') + def set_password_in_first_field(self, value: str): + self.choose_password_field.text = value - @allure.step('Go back') - def back(self): - self._back_button.click() - return YourEmojihashAndIdenticonRingView().wait_until_appears() + @allure.step('Repeat password') + def set_password_in_repeat_field(self, value: str): + self.repeat_password_field.text = value + + @property + @allure.step('Get error message') + def get_error_message(self): + return str(self.create_password_view.object.errorMsgText) + + @property + @allure.step('Get strength indicator color') + def strength_indicator_color(self) -> str: + return self.password_strength_indicator.object.fillColor['name'] + + @property + @allure.step('Get strength indicator text') + def strength_indicator_text(self) -> str: + return self.password_strength_indicator.object.text + + @property + @allure.step('Get indicator panel green messages') + def green_indicator_messages(self) -> typing.List[str]: + messages = [] + color = ColorCodes.GREEN.value + + for item in driver.findAllObjects(self.password_component_indicator.real_name): + if str(item.color.name) == color: + messages.append(str(item.text)) + return messages + + @property + @allure.step('Get password error message') + def password_error_message(self) -> str: + return self.create_password_view.object.errorMsgText class ConfirmPasswordView(OnboardingView): @@ -569,7 +750,7 @@ def confirm_password(self, value: str): @allure.step('Go back') def back(self): self._back_button.click() - return CreatePasswordView().wait_until_appears() + return OnboardingCreatePasswordView().wait_until_appears() @allure.step('Get password content from confirmation again field') def get_password_from_confirmation_again_field(self) -> str: @@ -577,7 +758,6 @@ def get_password_from_confirmation_again_field(self) -> str: class BiometricsView(OnboardingView): - def __init__(self): super(BiometricsView, self).__init__(onboarding_names.mainWindow_TouchIDAuthView) self._yes_use_touch_id_button = Button(onboarding_names.mainWindow_touchIdYesUseTouchIDButton) @@ -593,11 +773,27 @@ def is_touch_id_button_visible(self): return self._yes_use_touch_id_button.is_visible -class LoginView(QObject): +class OnboardingBiometricsView(OnboardingView): def __init__(self): - super(LoginView, self).__init__(onboarding_names.mainWindow_LoginView) - self._password_text_edit = TextEdit(onboarding_names.loginView_passwordInput) + super(OnboardingBiometricsView, self).__init__(onboarding_names.enableBiometricsView) + self.yes_use_biometrics_button = Button(onboarding_names.enableBiometricsButton) + self.maybe_later_button = Button(onboarding_names.dontEnableBiometricsButton) + + @allure.step('Select maybe later option') + def maybe_later(self): + self.maybe_later_button.click() + self.wait_until_hidden() + + +class ReturningLoginView(QObject): + + def __init__(self): + super().__init__(onboarding_names.mainWindow_LoginView) + self.user_selector_button = Button(onboarding_names.userSelectorButton) + self.login_password_input = TextEdit(onboarding_names.loginView_passwordInput) + self.login_button = Button(onboarding_names.loginButton) + self._arrow_right_button = Button(onboarding_names.loginView_submitBtn) self._current_user_name_label = TextLabel(onboarding_names.loginView_currentUserNameLabel) self._change_account_button = Button(onboarding_names.loginView_changeAccountBtn) @@ -614,39 +810,20 @@ def login_error_message(self) -> str: @allure.step('Log in user') def log_in(self, account): - if self._current_user_name_label.text != account.name: - self._change_account_button.hover() - self._change_account_button.click() - self.select_user_name(account.name) - - if self._use_password_instead.is_visible: - self._use_password_instead.click() - - self._password_text_edit.text = account.password - self._arrow_right_button.click() + if str(self.user_selector_button.object.label) != account.name: + self.user_selector_button.click() + self.select_user_by_name(account.name) + self.login_password_input.click() + self.login_password_input.text = account.password + self.login_button.click() @allure.step('Add existing user') def add_existing_status_user(self): - self._current_user_name_label.click() - self._add_existing_user_item.click() - return SignBySyncingView().wait_until_appears() - - @allure.step('Select user') - def select_user_name(self, user_name, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): - onboarding_names = set() - - def _select_user() -> bool: - for index in range(self._accounts_combobox.object.count): - name_object = self._accounts_combobox.object.itemAt(index) - name_label = str(name_object.label) - onboarding_names.add(name_label) - if name_label == user_name: - try: - driver.mouseClick(name_object) - except RuntimeError: - continue - return True - return False - - assert driver.waitFor(lambda: _select_user(), - timeout_msec), f'User name: "{user_name}" not found in {onboarding_names}' + self.user_selector_button.click() + OnboardingLoginUsersPopup().create_profile_button.click() + return CreateYourProfileViewOnboarding().wait_until_appears() + + @allure.step('Select user by name') + def select_user_by_name(self, user_name): + users_popup = OnboardingLoginUsersPopup() + users_popup.select_user_by_name(user_name) diff --git a/test/e2e/gui/screens/settings_messaging.py b/test/e2e/gui/screens/settings_messaging.py index fb6d958e4d0..f1657771809 100644 --- a/test/e2e/gui/screens/settings_messaging.py +++ b/test/e2e/gui/screens/settings_messaging.py @@ -1,9 +1,6 @@ import time import typing -import allure - -import configs.timeouts import driver from driver.objects_access import walk_children from gui.components.settings.block_user_popup import BlockUserPopup @@ -14,7 +11,6 @@ from gui.elements.button import Button from gui.elements.list import List -from gui.objects_map import settings_names from gui.screens.messages import MessagesScreen from scripts.tools.image import Image from gui.screens.settings import * @@ -29,10 +25,11 @@ def __init__(self): self._always_show_button = Button(settings_names.always_show_radioButton_StatusRadioButton) self._never_ask_button = Button(settings_names.never_show_radioButton_StatusRadioButton) - @allure.step('Wait until appears {0}') - def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): - self._contacts_button.wait_until_appears(timeout_msec) - return self + # TODO: commented to test how base method works with this view + # @allure.step('Wait until appears {0}') + # def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): + # self._contacts_button.wait_until_appears(timeout_msec) + # return self @allure.step('Open contacts settings') def open_contacts_settings(self) -> 'ContactsSettingsView': @@ -184,14 +181,13 @@ def send_contacts_request(self): def find_contact_in_list( self, contact: str, timeout_sec: int = configs.timeouts.MESSAGING_TIMEOUT_SEC): started_at = time.monotonic() - request = None - while request is None: + while time.monotonic() - started_at < timeout_sec: requests = self.contact_items for _request in requests: if _request.contact == contact: - request = _request - assert time.monotonic() - started_at < timeout_sec, f'Contact: {contact} not found in {requests}' - return request + return _request + + raise TimeoutError(f'Timed out after {timeout_sec} seconds: Contact request "{contact}" not found.') @allure.step('Accept contact request') def accept_contact_request(self, contact: str, diff --git a/test/e2e/gui/screens/settings_profile.py b/test/e2e/gui/screens/settings_profile.py index 7ef86c54a84..8eccbfa37f9 100644 --- a/test/e2e/gui/screens/settings_profile.py +++ b/test/e2e/gui/screens/settings_profile.py @@ -19,7 +19,7 @@ def __init__(self): super().__init__(settings_names.mainWindow_MyProfileView) self._scroll_view = Scroll(settings_names.settingsContentBase_ScrollView) self._display_name_text_field = TextEdit(settings_names.displayName_TextEdit) - self._save_button = Button(names.mainWindow_Save_changes_StatusButton) + self.save_changes_button = Button(names.mainWindow_Save_changes_StatusButton) self._bio_text_field = TextEdit(settings_names.bio_TextEdit) self._add_more_links_label = TextLabel(settings_names.addMoreSocialLinks) self._links_list = QObject(names.linksView) diff --git a/test/e2e/gui/screens/settings_syncing.py b/test/e2e/gui/screens/settings_syncing.py index e1428bb3fed..d042742ebb0 100644 --- a/test/e2e/gui/screens/settings_syncing.py +++ b/test/e2e/gui/screens/settings_syncing.py @@ -6,7 +6,7 @@ from gui.elements.button import Button from gui.elements.object import QObject from gui.elements.text_label import TextLabel -from gui.objects_map import settings_names, settings_names +from gui.objects_map import settings_names class SyncingSettingsView(QObject): @@ -33,7 +33,7 @@ def is_instructions_subtitle_present(self): == SyncingSettings.SYNC_A_NEW_DEVICE_INSTRUCTIONS_SUBTITLE.value), f"Sync a new device subtitle is incorrect" @allure.step('Setup syncing') - def set_up_syncing(self, password: str): + def open_sync_new_device_popup(self, password: str): self.click_setup_syncing() AuthenticatePopup().wait_until_appears().authenticate(password) return SyncNewDevicePopup().wait_until_appears() diff --git a/test/e2e/gui/screens/wallet.py b/test/e2e/gui/screens/wallet.py index a8cb6c971e6..a16551d6530 100644 --- a/test/e2e/gui/screens/wallet.py +++ b/test/e2e/gui/screens/wallet.py @@ -7,6 +7,7 @@ import configs import constants import driver +from constants import WalletAccount from driver.objects_access import walk_children from gui.components.context_menu import ContextMenu from gui.components.wallet.add_saved_address_popup import AddressPopup, EditSavedAddressPopup @@ -47,26 +48,24 @@ def is_total_balance_visible(self) -> bool: @property @allure.step('Get all accounts from list') - def accounts(self) -> typing.List[constants.WalletAccount]: + def accounts(self) -> typing.List[WalletAccount]: if 'title' in self._wallet_account_item.real_name.keys(): del self._wallet_account_item.real_name['title'] time.sleep(1) # to give a chance for the left panel to refresh raw_data = driver.findAllObjects(self._wallet_account_item.real_name) accounts = [] - if len(raw_data) > 0: - try: - for account_item in raw_data: - name = str(account_item.title) - color = str(account_item.asset.color.name).lower() - emoji = '' - for child in walk_children(account_item): - if hasattr(child, 'emojiId'): - emoji = str(child.emojiId) - break - accounts.append(constants.WalletAccount(name, color, emoji.split('-')[0])) - return accounts - except LookupError as err: - raise err + if raw_data: + for account_item in raw_data: + name = str(account_item.title) + color = str(account_item.asset.color.name).lower() + emoji = '' + for child in walk_children(account_item): + if hasattr(child, 'emojiId'): + emoji = str(child.emojiId) + break + accounts.append(constants.WalletAccount(name=name, color=color, emoji=emoji.split('-')[0])) + return accounts + raise LookupError('Accounts were not found') @allure.step('Get total balance value from All accounts') def get_total_balance_value(self): @@ -113,7 +112,7 @@ def hide_include_in_total_balance_from_context_menu(self, account_name: str): def open_edit_account_popup_from_context_menu(self, account_name: str) -> AccountPopup: context_menu = self._open_context_menu_for_account(account_name) context_menu.edit_from_context.click() - return AccountPopup().verify_edit_account_popup_present() + return AccountPopup().wait_until_appears().verify_edit_account_popup_present() @allure.step('Open account popup') def open_add_account_popup(self, attempt: int = 2): diff --git a/test/e2e/helpers/OnboardingHelper.py b/test/e2e/helpers/OnboardingHelper.py index e0499b40f2a..6b039f35f20 100644 --- a/test/e2e/helpers/OnboardingHelper.py +++ b/test/e2e/helpers/OnboardingHelper.py @@ -7,12 +7,12 @@ from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.components.splash_screen import SplashScreen -from gui.screens.onboarding import WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView +from gui.screens.onboarding import OnboardingWelcomeToStatusView, OnboardingBiometricsView, YourEmojihashAndIdenticonRingView with step('Open Generate new keys view'): def open_generate_new_keys_view(): BeforeStartedPopUp().get_started() - keys_screen = WelcomeToStatusView().wait_until_appears().get_keys() + keys_screen = OnboardingWelcomeToStatusView().wait_until_appears().get_keys() return keys_screen @@ -31,7 +31,7 @@ def finalize_onboarding_and_login(profile_view, user_account): confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view.confirm_password(user_account.password) if configs.system.get_platform() == "Darwin": - BiometricsView().wait_until_appears().prefer_password() + OnboardingBiometricsView().wait_until_appears().prefer_password() SplashScreen().wait_until_appears().wait_until_hidden() next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next() if configs.system.get_platform() == "Darwin": diff --git a/test/e2e/helpers/WalletHelper.py b/test/e2e/helpers/WalletHelper.py index 9610b82301a..c5acbb32d47 100644 --- a/test/e2e/helpers/WalletHelper.py +++ b/test/e2e/helpers/WalletHelper.py @@ -4,7 +4,6 @@ import driver from gui.components.authenticate_popup import AuthenticatePopup -from gui.components.signing_phrase_popup import SigningPhrasePopup with step('Authenticate user action with password'): def authenticate_with_password(user_account): diff --git a/test/e2e/tests/communities/test_communities_channels.py b/test/e2e/tests/communities/test_communities_channels.py index 984fc20ce6a..f5f87fe64a4 100644 --- a/test/e2e/tests/communities/test_communities_channels.py +++ b/test/e2e/tests/communities/test_communities_channels.py @@ -10,7 +10,6 @@ import constants import driver from constants import UserAccount, RandomCommunity -from gui.components.context_menu import ContextMenu from gui.main_window import MainWindow from gui.screens.messages import MessagesScreen from helpers.SettingsHelper import enable_community_creation diff --git a/test/e2e/tests/communities/test_communities_kick_ban.py b/test/e2e/tests/communities/test_communities_kick_ban.py index a7e9e34b589..b1eb3885172 100644 --- a/test/e2e/tests/communities/test_communities_kick_ban.py +++ b/test/e2e/tests/communities/test_communities_kick_ban.py @@ -7,9 +7,7 @@ import driver from constants import UserAccount, RandomUser, RandomCommunity, CommunityData from constants.community import ToastMessages -from driver.objects_access import walk_children from gui.screens.community import Members -from gui.screens.messages import MessagesScreen from helpers.SettingsHelper import enable_community_creation from scripts.utils.generators import random_text_message import configs.testpath diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py index 8e108dd8d30..5c2cec92e3e 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py @@ -55,6 +55,7 @@ def test_add_generated_account_restart_add_again( with step('Restart application'): aut.restart() + main_screen.prepare() main_screen.authorize_user(user_account) with step('Add second generated wallet account'): diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py index 948015d51ef..868e13a9d74 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py @@ -23,10 +23,8 @@ def test_add_edit_delete_generated_account(main_screen: MainWindow, user_account account_popup.wait_until_hidden() with step('Verify toast message notification when adding account'): - assert len(main_screen.wait_for_notification()) == 1, \ - f"Multiple toast messages appeared" - message = main_screen.wait_for_notification()[0] - assert message == f'"{name}" successfully added' + messages = main_screen.wait_for_notification() + assert f'"{name}" successfully added' in messages with step('Verify that the account is correctly displayed in accounts list'): assert driver.waitFor(lambda: name in [account.name for account in wallet.left_panel.accounts], 10000), \ diff --git a/test/e2e/tests/crtitical_tests_prs/test_back_up_recovery_phrase.py b/test/e2e/tests/crtitical_tests_prs/test_back_up_recovery_phrase.py new file mode 100755 index 00000000000..73430fda4ed --- /dev/null +++ b/test/e2e/tests/crtitical_tests_prs/test_back_up_recovery_phrase.py @@ -0,0 +1,66 @@ +import allure +import pytest +from allure import step + +import constants +import driver +from driver.aut import AUT +from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanner + +import configs.timeouts +from gui.main_window import MainWindow + + +@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit') +@pytest.mark.case(703421, 703010, 738725, 738758, 738771) +@pytest.mark.critical # TODO 'https://github.com/status-im/status-desktop/issues/13013' +@pytest.mark.smoke +def test_back_up_recovery_phrase_sign_out( + aut: AUT, main_screen: MainWindow, user_account): + with step('Open online identifier and check the data'): + online_identifier = main_screen.left_panel.open_online_identifier() + assert online_identifier.get_user_name == user_account.name, \ + f'Display name in online identifier is wrong, current: {online_identifier.get_user_name}, expected: {user_account.name}' + assert online_identifier._identicon_ring.is_visible, f'Identicon ring is not present when it should' + assert str(online_identifier.object.compressedPubKey) is not None, f'Public key is not present' + + with step('Verify that user avatar background color'): + avatar_color = str(main_screen.left_panel.profile_button.object.identicon.asset.color.name).upper() + assert avatar_color in constants.UserPictureColors.profile_colors(), \ + f'Avatar color should be one of the allowed colors but is {avatar_color}' + + with step('Open user profile from online identifier and check the data'): + online_identifier = main_screen.left_panel.open_online_identifier() + profile_popup = online_identifier.open_profile_popup_from_online_identifier() + profile_popup_user_name = profile_popup.user_name + assert profile_popup_user_name == user_account.name, \ + f'Display name in user profile is wrong, current: {profile_popup_user_name}, expected: {user_account.name}' + + with step('Open share profile popup and check the data'): + share_profile_popup = profile_popup.share_profile() + assert share_profile_popup.is_profile_qr_code_visibile, f'QR code is not displayed' + share_profile_popup.close() + + with step('Click left panel and open settings'): + main_screen.left_panel.click() + settings = main_screen.left_panel.open_settings() + + assert driver.waitFor(lambda: settings.left_panel.settings_section_back_up_seed_option.wait_until_appears, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f"Back up seed option is not present" + if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: + assert BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is not present" + assert BackUpSeedPhraseBanner().is_back_up_now_button_present(), 'Back up now button is not present' + + with step('Open back up seed phrase in settings'): + back_up = settings.left_panel.open_back_up_seed_phrase() + back_up.back_up_seed_phrase() + + with step('Verify back up seed phrase banner disappeared'): + assert not settings.left_panel.settings_section_back_up_seed_option.exists, f"Back up seed option is present" + if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: + BackUpSeedPhraseBanner().wait_to_hide_the_banner() + assert not BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is present" + + with step('Click sign out and quit in settings'): + sign_out_screen = settings.left_panel.open_sign_out_and_quit() + sign_out_screen.sign_out_and_quit() diff --git a/test/e2e/tests/crtitical_tests_prs/test_community_permissions_add_edit_delete_duplicate.py b/test/e2e/tests/crtitical_tests_prs/test_community_permissions_add_edit_delete_duplicate.py index a3c386bcfef..56b5b9eb1e5 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_community_permissions_add_edit_delete_duplicate.py +++ b/test/e2e/tests/crtitical_tests_prs/test_community_permissions_add_edit_delete_duplicate.py @@ -14,7 +14,6 @@ from helpers.SettingsHelper import enable_community_creation - @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703632', 'Manage community: Adding new permissions, Editing permissions, Deleting permission') @pytest.mark.case(703632, 705014, 705016) diff --git a/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py b/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py index d73d3683dc8..3e2c3047cb7 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py +++ b/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py @@ -65,7 +65,7 @@ def test_group_chat_add_contact_in_ac(multiple_instances, community_name, domain aut_two.attach() main_window.prepare() activity_center = ToolBar().open_activity_center() - request = activity_center.find_contact_request_in_list(user_one.name, timeout) + request = activity_center.find_contact_request_in_list(user_one.name) activity_center.click_activity_center_button( 'Contact requests').accept_contact_request(request) main_window.left_panel.click() diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py deleted file mode 100755 index caf0c245b40..00000000000 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py +++ /dev/null @@ -1,149 +0,0 @@ -import random - -import allure -import pytest -from allure import step - -import constants -import driver -from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanner -from gui.components.signing_phrase_popup import SigningPhrasePopup - -import configs.timeouts -from gui.components.onboarding.before_started_popup import BeforeStartedPopUp -from gui.components.onboarding.beta_consent_popup import BetaConsentPopup -from gui.components.picture_edit_popup import shift_image, PictureEditPopup -from gui.components.splash_screen import SplashScreen -from gui.screens.onboarding import WelcomeToStatusView, BiometricsView, \ - YourEmojihashAndIdenticonRingView - - -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703421', 'Generate new keys') -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit') -@pytest.mark.case(703421, 703010, 738725, 738758, 738771) -@pytest.mark.critical # TODO 'https://github.com/status-im/status-desktop/issues/13013' -@pytest.mark.smoke -@pytest.mark.parametrize('user_image, zoom, shift', [ - pytest.param( - random.choice(['sample_JPEG_1920×1280.jpeg', 'file_example_PNG_3MB.png', 'file_example_JPG_2500kB.jpg'] - ), - random.choice(range(1, 10)), - shift_image(0, 1000, 1000, 0)) -]) -def test_generate_account_back_up_seed_sign_out(aut, main_window, user_account, - user_image: str, zoom: int, shift): - with step('Click generate new keys and open profile view'): - BeforeStartedPopUp().get_started() - keys_screen = WelcomeToStatusView().wait_until_appears().get_keys() - - profile_view = keys_screen.generate_new_keys() - assert profile_view.is_next_button_enabled is False, \ - f'Next button is enabled on profile screen when it should not' - - with step('Type in the display name on the profile view'): - profile_view.set_display_name(user_account.name) - assert profile_view.get_display_name() == user_account.name, \ - f'Display name is empty or was not filled in' - assert not profile_view.get_error_message, \ - f'Error message {profile_view.get_error_message} is present when it should not' - - with step('Click plus button and add user picture'): - profile_view.set_profile_picture(configs.testpath.TEST_IMAGES / user_image) - PictureEditPopup().set_zoom_shift_for_picture(zoom=zoom, shift=shift) - assert profile_view.get_profile_image is not None, f'Profile picture was not set / applied' - assert profile_view.is_next_button_enabled is True, \ - f'Next button is not enabled on profile screen' - - with step('Open password set up view, fill in the form and click back'): - create_password_view = profile_view.next() - assert not create_password_view.is_create_password_button_enabled, \ - f'Create password button is enabled when it should not' - confirm_password_view = create_password_view.create_password(user_account.password) - confirm_password_view.back() - assert create_password_view.get_password_from_first_field is not None, \ - f'Password field lost its value when clicking back button' - assert create_password_view.get_password_from_confirmation_field is not None, \ - f'Password confirmation field lost its value when clicking back button' - - with step('Click create password and open password confirmation screen'): - confirm_password_view = create_password_view.click_create_password() - assert not confirm_password_view.is_confirm_password_button_enabled, \ - f'Finalise Status password creation button is enabled when it should not' - - with step('Confirm password and login'): - confirm_password_view.confirm_password(user_account.password) - if configs.system.get_platform() == "Darwin": - assert BiometricsView().is_touch_id_button_visible(), f"TouchID button is not found" - BiometricsView().wait_until_appears().prefer_password() - SplashScreen().wait_until_appears().wait_until_hidden() - - with step('Verify emojihash and identicon ring profile screen appeared and capture the details'): - emoji_hash_identicon_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present() - chat_key = emoji_hash_identicon_view.get_chat_key - assert len(chat_key) == 49 - assert emoji_hash_identicon_view._identicon_ring.is_visible, f'Identicon ring is not present when it should' - - with step('Click Start using Status'): - next_view = emoji_hash_identicon_view.next() - if configs.system.get_platform() == "Darwin": - next_view.start_using_status() - SplashScreen().wait_until_appears().wait_until_hidden() - if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: - BetaConsentPopup().confirm() - assert SigningPhrasePopup().ok_got_it_button.is_visible - SigningPhrasePopup().confirm_phrase() - - with step('Verify that user avatar background color'): - avatar_color = str(main_window.left_panel.profile_button.object.identicon.asset.color.name).upper() - assert avatar_color in constants.UserPictureColors.profile_colors(), \ - f'Avatar color should be one of the allowed colors but is {avatar_color}' - - with step('Open online identifier and check the data'): - online_identifier = main_window.left_panel.open_online_identifier() - assert online_identifier.get_user_name == user_account.name, \ - f'Display name in online identifier is wrong, current: {online_identifier.get_user_name}, expected: {user_account.name}' - assert online_identifier._identicon_ring.is_visible, \ - f'Identicon ring is not present when it should' - assert str(online_identifier.object.compressedPubKey) is not None, \ - f'Public key is not present' - assert chat_key in online_identifier.copy_link_to_profile(), f'Public keys should match when they dont' - - with step('Open user profile from online identifier and check the data'): - online_identifier = main_window.left_panel.open_online_identifier() - profile_popup = online_identifier.open_profile_popup_from_online_identifier() - profile_popup_user_name = profile_popup.user_name - profile_popup_chat_key = profile_popup.copy_chat_key - assert profile_popup_user_name == user_account.name, \ - f'Display name in user profile is wrong, current: {profile_popup_user_name}, expected: {user_account.name}' - assert profile_popup_chat_key == chat_key, \ - f'Chat key in user profile is wrong, current: {profile_popup_chat_key}, expected: {chat_key}' - - with step('Open share profile popup and check the data'): - share_profile_popup = profile_popup.share_profile() - profile_link = share_profile_popup.get_profile_link() - assert share_profile_popup.is_profile_qr_code_visibile, f'QR code is not displayed' - assert chat_key in profile_link, f'Profile link is wrong {profile_link}, it does not contain correct chat key' - share_profile_popup.close() - - with step('Click left panel and open settings'): - main_window.left_panel.click() - settings = main_window.left_panel.open_settings() - assert driver.waitFor(lambda: settings.left_panel.settings_section_back_up_seed_option.wait_until_appears, - configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f"Back up seed option is not present" - if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: - assert BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is not present" - assert BackUpSeedPhraseBanner().is_back_up_now_button_present(), 'Back up now button is not present' - - with step('Open back up seed phrase in settings'): - back_up = settings.left_panel.open_back_up_seed_phrase() - back_up.back_up_seed_phrase() - - with step('Verify back up seed phrase banner disappeared'): - assert not settings.left_panel.settings_section_back_up_seed_option.exists, f"Back up seed option is present" - if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: - BackUpSeedPhraseBanner().wait_to_hide_the_banner() - assert not BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is present" - - with step('Click sign out and quit in settings'): - sign_out_screen = settings.left_panel.open_sign_out_and_quit() - sign_out_screen.sign_out_and_quit() diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py index 132a9b50e9d..320ebeb8c69 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py +++ b/test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py @@ -2,16 +2,17 @@ import pytest from allure_commons._allure import step +import configs from constants.onboarding import KeysExistText from constants.wallet import WalletNetworkSettings from driver.aut import AUT -from helpers.OnboardingHelper import open_generate_new_keys_view, open_import_seed_view_and_do_import, \ - finalize_onboarding_and_login +from gui.components.onboarding.beta_consent_popup import BetaConsentPopup +from gui.components.signing_phrase_popup import SigningPhrasePopup +from gui.components.splash_screen import SplashScreen from scripts.utils.generators import random_mnemonic, get_wallet_address_from_mnemonic from gui.main_window import LeftPanel -from gui.screens.onboarding import LoginView - +from gui.screens.onboarding import ReturningLoginView, OnboardingWelcomeToStatusView, OnboardingBiometricsView @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase') @@ -21,16 +22,31 @@ @pytest.mark.smoke def test_import_and_reimport_random_seed(main_window, aut: AUT, user_account): - keys_screen = open_generate_new_keys_view() + create_your_profile_view = \ + OnboardingWelcomeToStatusView().wait_until_appears().open_create_your_profile_view() + seed_view = create_your_profile_view.open_seed_phrase_view() seed_phrase = random_mnemonic() - profile_view = open_import_seed_view_and_do_import(keys_screen, seed_phrase, user_account) - finalize_onboarding_and_login(profile_view, user_account) + seed_view.fill_in_seed_phrase_grid(seed_phrase.split(), autocomplete=False) + create_password_view = seed_view.continue_import() + create_password_view.create_password(user_account.password) + splash_screen = SplashScreen().wait_until_appears() + splash_screen.wait_until_hidden() + if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: + BetaConsentPopup().confirm() + signing_phrase = SigningPhrasePopup().wait_until_appears() + signing_phrase.confirm_phrase() + + with step('Verify that restored account reveals correct status wallet address'): + left_panel = LeftPanel() + profile = left_panel.open_settings().left_panel.open_profile_settings() + profile.set_name(user_account.name) + profile.save_changes_button.click() - with (step('Verify that restored account reveals correct status wallet address')): status_account_index = 0 status_acc_view = ( - LeftPanel().open_settings().left_panel.open_wallet_settings().open_account_in_settings(WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value, - status_account_index)) + LeftPanel().open_settings().left_panel.open_wallet_settings().open_account_in_settings( + WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value, + status_account_index)) address = status_acc_view.get_account_address_value() address_from_seed = get_wallet_address_from_mnemonic(seed_phrase) assert address == address_from_seed, \ @@ -43,10 +59,13 @@ def test_import_and_reimport_random_seed(main_window, aut: AUT, user_account): with step('Restart application and try re-importing seed phrase again'): aut.restart() - enter_seed_view = LoginView().add_existing_status_user().open_keys_view().open_enter_seed_phrase_view() - enter_seed_view.input_seed_phrase(seed_phrase.split(), autocomplete=False) - confirm_import = enter_seed_view.click_import_seed_phrase_button() - - with step('Verify that keys already exist popup appears and text is correct'): - assert confirm_import.get_key_exist_title() == KeysExistText.KEYS_EXIST_TITLE.value - assert KeysExistText.KEYS_EXIST_TEXT.value in confirm_import.get_text_labels() + main_window.prepare() + enter_seed_view = ReturningLoginView().add_existing_status_user().open_seed_phrase_view() + enter_seed_view.fill_in_seed_phrase_grid(seed_phrase.split(), autocomplete=False) + enter_seed_view.continue_button.click() + + # TODO: add verification of error message when it is implemented, current flow leads to dead end + # https: // github.com / status - im / status - desktop / issues / 17248 + # with step('Verify that keys already exist popup appears and text is correct'): + # assert enter_seed_view. == KeysExistText.KEYS_EXIST_TITLE.value + # assert KeysExistText.KEYS_EXIST_TEXT.value in confirm_import.get_text_labels() diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py index b97d14ec122..6ed6ee5efd5 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py +++ b/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py @@ -8,12 +8,10 @@ import configs.testpath import driver from constants import UserAccount, RandomUser -from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.splash_screen import SplashScreen from gui.main_window import MainWindow -from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, SyncResultView, SyncDeviceFoundView, \ - YourEmojihashAndIdenticonRingView +from gui.screens.onboarding import OnboardingWelcomeToStatusView, SyncResultView, OnboardingProfileSyncedView, OnboardingBiometricsView @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703592', 'Sync device during onboarding') @@ -34,10 +32,9 @@ def test_sync_device_during_onboarding(multiple_instances): sync_settings_view.is_instructions_subtitle_present() if configs.DEV_BUILD: sync_settings_view.is_backup_button_present() - setup_syncing = main_window.left_panel.open_settings().left_panel.open_syncing_settings().set_up_syncing( + setup_syncing = main_window.left_panel.open_settings().left_panel.open_syncing_settings().open_sync_new_device_popup( user.password) sync_code = setup_syncing.syncing_code - setup_syncing.done() main_window.hide() with step('Verify syncing code is correct'): @@ -48,41 +45,43 @@ def test_sync_device_during_onboarding(multiple_instances): with step('Open sync code form in second instance'): aut_two.attach() main_window.prepare() - BeforeStartedPopUp().get_started() - welcome_screen = WelcomeToStatusView().wait_until_appears() - sync_view = welcome_screen.sync_existing_user().open_sync_code_view() + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + sync_view = welcome_screen.sync_existing_user() with step('Paste sync code on second instance and wait until device is synced'): sync_start = sync_view.open_enter_sync_code_form() pyperclip.copy(sync_code) sync_start.click_paste_button() sync_start.continue_button.click() - sync_device_found = SyncDeviceFoundView() + profile_syncing_view = OnboardingProfileSyncedView().wait_until_appears() assert driver.waitFor( - lambda: 'Device found!' in sync_device_found.device_found_notifications, 15000) - try: - assert driver.waitForObjectExists(SyncResultView().real_name, 15000), \ - f'Sync result view is not shown within 15 seconds' - except (Exception, AssertionError) as ex: - raise ex - sync_result = SyncResultView() + lambda: 'Profile sync in progress' in str(profile_syncing_view.profile_synced_view_header.object.text), 5000) + assert driver.waitForObject(profile_syncing_view.log_in_button.real_name, 15000), \ + f'Log in button is not shown within 15 seconds' assert driver.waitFor( - lambda: 'Device synced!' in sync_result.device_synced_notifications, 23000) - assert user.name in sync_device_found.device_found_notifications + lambda: 'Profile synced' in str(profile_syncing_view.profile_synced_view_header.object.text), 5000) with step('Sign in to synced account'): - sync_result.sign_in() - SplashScreen().wait_until_hidden() - YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next() + profile_syncing_view.log_in_button.click() if configs.system.get_platform() == "Darwin": - AllowNotificationsView().start_using_status() - SplashScreen().wait_until_appears().wait_until_hidden() + OnboardingBiometricsView().maybe_later() + splash_screen = SplashScreen().wait_until_appears() + splash_screen.wait_until_hidden() if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: BetaConsentPopup().confirm() - assert SigningPhrasePopup().ok_got_it_button.is_visible - SigningPhrasePopup().confirm_phrase() + signing_phrase = SigningPhrasePopup().wait_until_appears() + signing_phrase.confirm_phrase() with step('Verify user details are the same with user in first instance'): online_identifier = main_window.left_panel.open_online_identifier() assert online_identifier.get_user_name == user.name, \ f'Name in online identifier and display name do not match' + main_window.hide() + + with step('Check the first instance'): + aut_one.attach() + main_window.prepare() + sync_device_found = SyncResultView() + assert driver.waitFor( + lambda: 'Device synced!' in sync_device_found.device_synced_notifications, 23000) + assert user.name in sync_device_found.device_synced_notifications diff --git a/test/e2e/tests/crtitical_tests_prs/test_settings_password_change_password.py b/test/e2e/tests/crtitical_tests_prs/test_settings_password_change_password.py index 2e275cbfaf2..b7e3421d8f9 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_settings_password_change_password.py +++ b/test/e2e/tests/crtitical_tests_prs/test_settings_password_change_password.py @@ -30,6 +30,7 @@ def test_change_password_and_login(aut: AUT, main_screen: MainWindow, user_accou with step('Restart application'): aut.restart() + main_screen.prepare() with step('Login with new password'): main_screen.authorize_user(UserAccount(name=user_account.name, diff --git a/test/e2e/tests/onboarding/test_onboarding_negative_scenarios.py b/test/e2e/tests/onboarding/test_onboarding_negative_scenarios.py index d1ea1b9fe13..7a625fef68b 100644 --- a/test/e2e/tests/onboarding/test_onboarding_negative_scenarios.py +++ b/test/e2e/tests/onboarding/test_onboarding_negative_scenarios.py @@ -1,24 +1,17 @@ -import random -import string import time import allure import pytest from allure_commons._allure import step -from gui.components.signing_phrase_popup import SigningPhrasePopup -from helpers.OnboardingHelper import open_generate_new_keys_view +from gui.main_window import MainWindow from . import marks -import configs.system -from constants import UserAccount, RandomUser +from constants import UserAccount from scripts.utils.generators import random_password_string from constants.onboarding import OnboardingMessages from driver.aut import AUT -from gui.components.onboarding.beta_consent_popup import BetaConsentPopup -from gui.components.splash_screen import SplashScreen -from gui.screens.onboarding import BiometricsView, LoginView, \ - YourEmojihashAndIdenticonRingView +from gui.screens.onboarding import ReturningLoginView, OnboardingWelcomeToStatusView pytestmark = marks @@ -27,41 +20,19 @@ @pytest.mark.case(702991) @pytest.mark.parametrize('error', [OnboardingMessages.PASSWORD_INCORRECT.value ]) -def test_login_with_wrong_password(aut: AUT, main_window, error: str): - user_one: UserAccount = RandomUser() - - keys_screen = open_generate_new_keys_view() - - with step('Open generate keys view and set user name'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_one.name) - - with step('Finalize onboarding and open main screen'): - create_password_view = profile_view.next() - confirm_password_view = create_password_view.create_password(user_one.password) - confirm_password_view.confirm_password(user_one.password) - if configs.system.get_platform() == "Darwin": - BiometricsView().wait_until_appears().prefer_password() - SplashScreen().wait_until_appears().wait_until_hidden() - next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next() - if configs.system.get_platform() == "Darwin": - next_view.start_using_status() - SplashScreen().wait_until_appears().wait_until_hidden() - if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: - BetaConsentPopup().confirm() - if SigningPhrasePopup().is_visible: - SigningPhrasePopup().confirm_phrase() +def test_login_with_wrong_password(aut: AUT, main_screen: MainWindow, user_account, error: str): with step('Verify that the user logged in correctly'): - user_image = main_window.left_panel.open_online_identifier() + user_image = main_screen.left_panel.open_online_identifier() profile_popup = user_image.open_profile_popup_from_online_identifier() - assert profile_popup.user_name == user_one.name + assert profile_popup.user_name == user_account.name with step('Restart application and input wrong password'): aut.restart() - login_view = LoginView() + main_screen.prepare() + login_view = ReturningLoginView() login_view.log_in(UserAccount( - name=user_one.name, + name=user_account.name, password=random_password_string() )) time.sleep(2) @@ -70,31 +41,6 @@ def test_login_with_wrong_password(aut: AUT, main_window, error: str): assert login_view.login_error_message == error -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702992', 'Sign up with wrong username format') -@pytest.mark.case(702992) -@pytest.mark.parametrize('user_name, error', [ - pytest.param('Athl', OnboardingMessages.WRONG_LOGIN_LESS_LETTERS.value), - pytest.param('Gra', OnboardingMessages.WRONG_LOGIN_LESS_LETTERS.value), - pytest.param('tester3@', OnboardingMessages.WRONG_LOGIN_SYMBOLS_NOT_ALLOWED.value), - pytest.param(''.join(random.choice(string.punctuation) for i in range(5, 25)), - OnboardingMessages.WRONG_LOGIN_SYMBOLS_NOT_ALLOWED.value) -]) -def test_sign_up_with_wrong_name(aut: AUT, main_window, user_name, error): - keys_screen = open_generate_new_keys_view() - - with step(f'Input name Athl'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_name) - - with step('Verify that button Next is disabled and correct error appears'): - assert profile_view.is_next_button_enabled is False - assert profile_view.get_error_message == error - - with step('Clear content of disply name field and verify it is empty'): - profile_view.clear_field() - assert profile_view.get_display_name() == '' - - @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702993', 'Sign up with password shorter than 10 chars') @pytest.mark.case(702993) @@ -102,65 +48,18 @@ def test_sign_up_with_wrong_name(aut: AUT, main_window, user_name, error): pytest.param(OnboardingMessages.WRONG_PASSWORD.value), ]) def test_sign_up_with_wrong_password_length(user_account, error: str, aut: AUT, main_window): - keys_screen = open_generate_new_keys_view() - with step('Input correct user name'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_account.name) + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + profile_view = welcome_screen.open_create_your_profile_view() + create_password_view = profile_view.open_password_view() with step('Input wrong password in both first and confirmation fields'): - create_password_view = profile_view.next() create_password_view.set_password_in_first_field(user_account.password[:8]) - create_password_view.set_password_in_confirmation_field(user_account.password[:8]) - - with step('Verify that button Create password is disabled and correct error appears'): - assert create_password_view.is_create_password_button_enabled is False - assert str(create_password_view.password_error_message) == error - - -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702994', - 'Sign up with right password format in new password input but incorrect in confirmation password input') -@pytest.mark.case(702994) -def test_sign_up_with_wrong_password_in_confirmation_field(user_account, aut: AUT, main_window): - keys_screen = open_generate_new_keys_view() - - with step('Input correct user name'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_account.name) + create_password_view.set_password_in_repeat_field(user_account.password[:8]) - with step('Input correct password in first field and wrong password in confirmation field'): - create_password_view = profile_view.next() - create_password_view.set_password_in_first_field(user_account.password) - create_password_view.set_password_in_confirmation_field(random_password_string()) - - with step('Verify that button Create password is disabled'): - assert create_password_view.is_create_password_button_enabled is False - - -@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702995', - 'Sign up with incorrect confirmation-again password') -@pytest.mark.case(702995) -@pytest.mark.parametrize('error', [ - pytest.param(OnboardingMessages.PASSWORDS_DONT_MATCH.value), -]) -def test_sign_up_with_wrong_password_in_confirmation_again_field(user_account, - error: str, aut: AUT, main_window): - keys_screen = open_generate_new_keys_view() - - with step('Input correct user name'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_account.name) - - with step('Input correct password in both first and confirmation fields'): - create_password_view = profile_view.next() - confirm_password_view = create_password_view.create_password(user_account.password) - - with step('Input wrong password in confirmation again field'): - confirm_password_view.set_password(random_password_string()) - - with step('Verify that button Finalise Status Password Creation is disabled and correct error appears'): - assert confirm_password_view.is_confirm_password_button_enabled is False - assert confirm_password_view.confirmation_error_message == error + with step('Verify that Continue button is disabled and correct error appears'): + assert not create_password_view.confirm_password_button.is_visible + assert str(create_password_view.get_error_message) == error @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702999', @@ -170,11 +69,13 @@ def test_sign_up_with_wrong_password_in_confirmation_again_field(user_account, pytest.param('pelican chief sudden oval media rare swamp elephant lawsuit wheal knife initial'), ]) def test_sign_up_with_wrong_seed_phrase(seed_phrase: str, aut: AUT, main_window): - keys_screen = open_generate_new_keys_view() + + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + profile_view = welcome_screen.open_create_your_profile_view() + input_seed_view = profile_view.open_seed_phrase_view() with step('Open import seed phrase view and enter seed phrase'): - input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view() - input_view.input_seed_phrase(seed_phrase.split(), False) + input_seed_view.fill_in_seed_phrase_grid(seed_phrase.split(), False) with step('Verify that import button is disabled'): - assert input_view.is_import_button_enabled is False + assert not input_seed_view.continue_button.is_visible diff --git a/test/e2e/tests/onboarding/test_onboarding_syncing.py b/test/e2e/tests/onboarding/test_onboarding_syncing.py index 64f1e167f7d..854474aeb1b 100644 --- a/test/e2e/tests/onboarding/test_onboarding_syncing.py +++ b/test/e2e/tests/onboarding/test_onboarding_syncing.py @@ -8,19 +8,17 @@ import configs.testpath from constants.syncing import SyncingSettings -from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.main_window import MainWindow -from gui.screens.onboarding import WelcomeToStatusView, SyncCodeView +from gui.screens.onboarding import OnboardingWelcomeToStatusView, OnboardingSyncCodeView pytestmark = marks @pytest.fixture -def sync_screen(main_window) -> SyncCodeView: +def sync_screen(main_window) -> OnboardingSyncCodeView: with step('Open Syncing view'): - BeforeStartedPopUp().get_started() - welcome_screen = WelcomeToStatusView().wait_until_appears() - return welcome_screen.sync_existing_user().open_sync_code_view() + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + return welcome_screen.sync_existing_user() @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703631', 'Wrong sync code') @@ -30,26 +28,28 @@ def sync_screen(main_window) -> SyncCodeView: ]) def test_wrong_sync_code(sync_screen, wrong_sync_code): with step('Open sync code form'): - sync_view = sync_screen.open_enter_sync_code_form() + sync_code_form = sync_screen.open_enter_sync_code_form() with step('Paste wrong sync code and check that error message appears'): pyperclip.copy(wrong_sync_code) - sync_view.click_paste_button() - assert str(SyncingSettings.SYNC_CODE_IS_WRONG_TEXT.value == sync_view.sync_code_error_message), \ + sync_code_form.click_paste_button() + assert str(SyncingSettings.SYNC_CODE_IS_WRONG_TEXT.value == sync_code_form.get_sync_code_error_message), \ f'Wrong sync code message did not appear' @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703591', 'Generate sync code. Negative') @pytest.mark.case(703591) -def test_cancel_setup_syncing(main_screen: MainWindow): +def test_cancel_setup_syncing(main_screen: MainWindow, user_account): with step('Open syncing settings'): sync_settings_view = main_screen.left_panel.open_settings().left_panel.open_syncing_settings() sync_settings_view.is_instructions_header_present() sync_settings_view.is_instructions_subtitle_present() if configs.DEV_BUILD: sync_settings_view.is_backup_button_present() + with step('Click setup syncing and close authenticate popup'): - sync_settings_view.click_setup_syncing().close_authenticate_popup() + sync_new_device_popup = sync_settings_view.open_sync_new_device_popup(user_account.password) + sync_new_device_popup.close() with step('Verify that authenticate popup was closed and syncing settings view appears after closing'): SyncingSettingsView().wait_until_appears() diff --git a/test/e2e/tests/onboarding/test_password_strength.py b/test/e2e/tests/onboarding/test_password_strength.py index 585435b4f73..1462891c413 100644 --- a/test/e2e/tests/onboarding/test_password_strength.py +++ b/test/e2e/tests/onboarding/test_password_strength.py @@ -1,8 +1,7 @@ import allure import pytest -from allure_commons._allure import step -from helpers.OnboardingHelper import open_generate_new_keys_view +from gui.screens.onboarding import OnboardingWelcomeToStatusView from . import marks from constants.onboarding import very_weak_lower_elements, very_weak_upper_elements, \ @@ -23,48 +22,14 @@ def test_check_password_strength_and_login(main_window, user_account): ('+1_3!48a11', okay_elements), ('+1_3!48aT1', good_elements), ('+1_3!48aTq', strong_elements)] - expected_password = "" - - keys_screen = open_generate_new_keys_view() - - with step('Input correct user name'): - profile_view = keys_screen.generate_new_keys() - profile_view.set_display_name(user_account.name) - - with step('Verify that correct strength indicator color, text and green messages appear'): - create_password_view = profile_view.next() - - for (input_text, expected_indicator) in values: - expected_password = input_text - create_password_view.set_password_in_first_field(input_text) - assert create_password_view.strength_indicator_color == expected_indicator[1] - assert str(create_password_view.strength_indicator_text) == expected_indicator[0] - assert sorted(create_password_view.green_indicator_messages) == sorted(expected_indicator[2]) - assert not create_password_view.is_create_password_button_enabled - - with step('Toggle view/hide password buttons'): - create_password_view.set_password_in_confirmation_field(expected_password) - assert create_password_view.is_create_password_button_enabled - - create_password_view.click_show_icon(0) - assert create_password_view.get_password_from_first_field() == expected_password - - create_password_view.click_hide_icon(0) - - create_password_view.click_show_icon(1) - assert create_password_view.get_password_from_confirmation_field() == expected_password - - create_password_view.click_hide_icon(0) - - with step('Confirm creation of password and set password in confirmation again field'): - confirm_password_view = create_password_view.click_create_password() - assert not confirm_password_view.is_confirm_password_button_enabled - - confirm_password_view.set_password(expected_password) - assert confirm_password_view.is_confirm_password_button_enabled - - with step('Click show icon to show password and check that shown password is correct'): - create_password_view.click_show_icon(0) - assert confirm_password_view.get_password_from_confirmation_again_field() == expected_password + welcome_screen = OnboardingWelcomeToStatusView().wait_until_appears() + profile_view = welcome_screen.open_create_your_profile_view() + create_password_view = profile_view.open_password_view() + for (input_text, expected_indicator) in values: + create_password_view.set_password_in_first_field(input_text) + assert create_password_view.strength_indicator_color == expected_indicator[1] + assert str(create_password_view.strength_indicator_text) == expected_indicator[0] + assert sorted(create_password_view.green_indicator_messages) == sorted(expected_indicator[2]) + assert not create_password_view.confirm_password_button.is_visible diff --git a/test/e2e/tests/online_identifier/test_online_identifier.py b/test/e2e/tests/online_identifier/test_online_identifier.py index c5ec7bde870..a6402b66ddf 100644 --- a/test/e2e/tests/online_identifier/test_online_identifier.py +++ b/test/e2e/tests/online_identifier/test_online_identifier.py @@ -1,14 +1,11 @@ -import time - import allure import pytest from allure import step import configs -import driver -from constants import UserAccount, ColorCodes, RandomUser +from constants import UserAccount, RandomUser from gui.screens.messages import ToolBar -from scripts.utils.generators import random_name_string, random_password_string +from scripts.utils.generators import random_name_string from gui.components.changes_detected_popup import ChangesDetectedToastMessage from gui.main_window import MainWindow from . import marks diff --git a/test/e2e/tests/settings/settings_profile/test_settings_profile_edit.py b/test/e2e/tests/settings/settings_profile/test_settings_profile_edit.py index 01850d6190b..dd4947eac3b 100644 --- a/test/e2e/tests/settings/settings_profile/test_settings_profile_edit.py +++ b/test/e2e/tests/settings/settings_profile/test_settings_profile_edit.py @@ -2,7 +2,7 @@ import pytest from allure_commons._allure import step -from constants import UserAccount, RandomUser +from constants import UserAccount from scripts.utils.generators import random_name_string from . import marks @@ -47,6 +47,7 @@ def test_set_name_bio_social_links(main_screen: MainWindow, aut: AUT, user_accou with step('Restart application'): aut.restart() + main_screen.prepare() main_screen.authorize_user(user_account=UserAccount(name=new_user_name, password=user_account.password)) with step('Open profile settings and check new name, bio and links'): diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py index 559a70eb9c4..6087ef3b025 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py @@ -1,6 +1,5 @@ import random import string -import time import allure import pytest @@ -11,7 +10,6 @@ from helpers.WalletHelper import authenticate_with_password from constants.wallet import WalletAccountPopup -import constants from gui.main_window import MainWindow diff --git a/test/e2e/tests/transactions_tests/test_wallet_send_nft.py b/test/e2e/tests/transactions_tests/test_wallet_send_nft.py index b1bfe2eacbb..29d7eb96084 100644 --- a/test/e2e/tests/transactions_tests/test_wallet_send_nft.py +++ b/test/e2e/tests/transactions_tests/test_wallet_send_nft.py @@ -1,6 +1,5 @@ import allure import pytest -import driver from configs import WALLET_SEED from constants import ReturningUser from constants.wallet import WalletTransactions, WalletNetworkSettings diff --git a/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py b/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py index 47d5ec3d1d8..3de0ae5d04b 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py +++ b/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py @@ -1,17 +1,13 @@ -import time - import allure import pytest from allure_commons._allure import step -import configs.system import driver from gui.components.changes_detected_popup import CustomSortOrderChangesDetectedToastMessage from gui.screens.wallet import WalletAccountView from gui.screens.settings_wallet import ManageTokensSettingsView from tests.wallet_main_screen import marks -from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.main_window import MainWindow pytestmark = marks diff --git a/test/e2e/tests/wallet_main_screen/wallet - footer actions/test_footer_actions_default_account_values.py b/test/e2e/tests/wallet_main_screen/wallet - footer actions/test_footer_actions_default_account_values.py index 8af321f52a5..cda3a2cd7c6 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - footer actions/test_footer_actions_default_account_values.py +++ b/test/e2e/tests/wallet_main_screen/wallet - footer actions/test_footer_actions_default_account_values.py @@ -2,9 +2,6 @@ import pytest from allure_commons._allure import step -from configs import testpath -from gui.components.signing_phrase_popup import SigningPhrasePopup - @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/edit/739265', 'Default account values in send, receive, bridge popups') diff --git a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_private_key.py b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_private_key.py index b3ae0902063..1961c8dbd50 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_private_key.py +++ b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_private_key.py @@ -1,5 +1,3 @@ -import time - import allure import pytest from allure_commons._allure import step diff --git a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_generated_account_custom_derivation_path.py b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_generated_account_custom_derivation_path.py index bf52094272e..29f6f8bda21 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_generated_account_custom_derivation_path.py +++ b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_generated_account_custom_derivation_path.py @@ -1,5 +1,4 @@ import random -import time import allure import pytest @@ -8,11 +7,7 @@ import driver from constants import RandomWalletAccount from constants.wallet import DerivationPathName -from scripts.utils.generators import random_wallet_acc_keypair_name from tests.wallet_main_screen import marks - -import constants -from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.main_window import MainWindow pytestmark = marks diff --git a/test/e2e/tests/wallet_main_screen/wallet - right click on account/test_context_menu_edit_default_account.py b/test/e2e/tests/wallet_main_screen/wallet - right click on account/test_context_menu_edit_default_account.py index ef346999ff7..e3dd5746a01 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - right click on account/test_context_menu_edit_default_account.py +++ b/test/e2e/tests/wallet_main_screen/wallet - right click on account/test_context_menu_edit_default_account.py @@ -1,5 +1,3 @@ -import time - import allure import pytest from allure_commons._allure import step @@ -8,9 +6,6 @@ from constants.wallet import WalletNetworkSettings from scripts.utils.generators import random_wallet_acc_keypair_name from tests.wallet_main_screen import marks - -import constants -from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.main_window import MainWindow pytestmark = marks diff --git a/test/e2e/tests/wallet_main_screen/wallet - saved addresses/test_saved_addresses.py b/test/e2e/tests/wallet_main_screen/wallet - saved addresses/test_saved_addresses.py index 440aa9b8a03..9dbcc6f22cb 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - saved addresses/test_saved_addresses.py +++ b/test/e2e/tests/wallet_main_screen/wallet - saved addresses/test_saved_addresses.py @@ -1,6 +1,3 @@ -import random -import string - import allure import pytest from allure import step diff --git a/test/ui-test/testSuites/suite_communities/config.xml b/test/ui-test/testSuites/suite_communities/config.xml index 27738dbabd7..1a15105de30 100644 --- a/test/ui-test/testSuites/suite_communities/config.xml +++ b/test/ui-test/testSuites/suite_communities/config.xml @@ -1,8 +1,8 @@ - - - - - - + + + + + +