diff --git a/test/e2e/constants/onboarding.py b/test/e2e/constants/onboarding.py index 6770c80faf..8ede6b25a2 100644 --- a/test/e2e/constants/onboarding.py +++ b/test/e2e/constants/onboarding.py @@ -23,13 +23,13 @@ class KeysExistText(Enum): password_strength_elements = namedtuple('Password_Strength_Elements', ['strength_indicator', 'strength_color', 'strength_messages']) -very_weak_lower_elements = password_strength_elements('Very weak', '#ff2d55', ['• Lower case']) -very_weak_upper_elements = password_strength_elements('Very weak', '#ff2d55', ['• Upper case']) -very_weak_numbers_elements = password_strength_elements('Very weak', '#ff2d55', ['• Numbers']) -very_weak_symbols_elements = password_strength_elements('Very weak', '#ff2d55', ['• Symbols']) -weak_elements = password_strength_elements('Weak', '#fe8f59', ['• Numbers', '• Symbols']) -so_so_elements = password_strength_elements('So-so', '#ffca0f', ['• Lower case', '• Numbers', '• Symbols']) +very_weak_lower_elements = password_strength_elements('Very weak', '#ff2d55', ['✓ Lower case']) +very_weak_upper_elements = password_strength_elements('Very weak', '#ff2d55', ['✓ Upper case']) +very_weak_numbers_elements = password_strength_elements('Very weak', '#ff2d55', ['✓ Numbers']) +very_weak_symbols_elements = password_strength_elements('Very weak', '#ff2d55', ['✓ Symbols']) +weak_elements = password_strength_elements('Weak', '#fe8f59', ['✓ Numbers', '✓ Symbols']) +okay_elements = password_strength_elements('Okay', '#ffca0f', ['✓ Lower case', '✓ Numbers', '✓ Symbols']) good_elements = password_strength_elements('Good', '#9ea85d', - ['• Lower case', '• Upper case', '• Numbers', '• Symbols']) -great_elements = password_strength_elements('Great', '#4ebc60', - ['• Lower case', '• Upper case', '• Numbers', '• Symbols']) + ['✓ Lower case', '✓ Upper case', '✓ Numbers', '✓ Symbols']) +strong_elements = password_strength_elements('Very strong', '#4ebc60', + ['✓ Lower case', '✓ Upper case', '✓ Numbers', '✓ Symbols']) diff --git a/test/e2e/gui/objects_map/onboarding_names.py b/test/e2e/gui/objects_map/onboarding_names.py index 00b8485a3d..65f47c3f59 100644 --- a/test/e2e/gui/objects_map/onboarding_names.py +++ b/test/e2e/gui/objects_map/onboarding_names.py @@ -44,10 +44,11 @@ mainWindow_Import_StatusButton = {"checkable": False, "container": mainWindow_Se # SyncCode View mainWindow_SyncCodeView = {"container": statusDesktop_mainWindow, "type": "SyncCodeView", "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, "text": "Enter sync code", "type": "StatusSwitchTabButton", "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} # SyncDevice View mainWindow_SyncingDeviceView_found = {"container": statusDesktop_mainWindow, "type": "SyncingDeviceView", "unnamed": 1, "visible": True} @@ -89,7 +90,7 @@ mainWindow_passwordViewNewPassword = {"container": mainWindow_CreatePasswordView 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": "RowLayout", "unnamed": 1, "visible": True} +mainWindow_RowLayout = {"container": statusDesktop_mainWindow, "type": "PassIncludesIndicator", "unnamed": 1, "visible": True} mainWindow_strengthInditactor_StatusPasswordStrengthIndicator = {"container": statusDesktop_mainWindow, "id": "strengthInditactor", "type": "StatusPasswordStrengthIndicator", "unnamed": 1, "visible": True} mainWindow_show_icon_StatusIcon = {"container": statusDesktop_mainWindow, "objectName": "show-icon", "type": "StatusIcon", "visible": True} mainWindow_hide_icon_StatusIcon = {"container": statusDesktop_mainWindow, "objectName": "hide-icon", "type": "StatusIcon", "visible": True} diff --git a/test/e2e/gui/screens/onboarding.py b/test/e2e/gui/screens/onboarding.py index 81194bfdb9..84847c9838 100755 --- a/test/e2e/gui/screens/onboarding.py +++ b/test/e2e/gui/screens/onboarding.py @@ -148,6 +148,7 @@ class SyncCodeView(OnboardingView): 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): @@ -481,15 +482,10 @@ class CreatePasswordView(OnboardingView): def green_indicator_messages(self) -> typing.List[str]: messages = [] color = ColorCodes.GREEN.value - for child in walk_children(self._indicator_panel_object.object): - if getattr(child, 'id', '') == 'lowerCaseTxt' and child.color['name'] == color: - messages.append(str(child.text)) - elif getattr(child, 'id', '') == 'upperCaseTxt' and child.color['name'] == color: - messages.append(str(child.text)) - elif getattr(child, 'id', '') == 'numbersTxt' and child.color['name'] == color: - messages.append(str(child.text)) - elif getattr(child, 'id', '') == 'symbolsTxt' and child.color['name'] == color: - messages.append(str(child.text)) + + for item in driver.findAllObjects(self._indicator_panel_object.real_name): + if str(item.color.name) == color: + messages.append(str(item.text)) return messages @property 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 e04ff2a0d5..b853f98a20 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 @@ -58,6 +58,7 @@ def test_sync_device_during_onboarding(multiple_instances): 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() assert driver.waitFor( lambda: 'Device found!' in sync_device_found.device_found_notifications, 15000) diff --git a/test/e2e/tests/onboarding/test_onboarding_syncing.py b/test/e2e/tests/onboarding/test_onboarding_syncing.py index 1561ecb589..64f1e167f7 100644 --- a/test/e2e/tests/onboarding/test_onboarding_syncing.py +++ b/test/e2e/tests/onboarding/test_onboarding_syncing.py @@ -35,7 +35,8 @@ def test_wrong_sync_code(sync_screen, wrong_sync_code): with step('Paste wrong sync code and check that error message appears'): pyperclip.copy(wrong_sync_code) sync_view.click_paste_button() - assert SyncingSettings.SYNC_CODE_IS_WRONG_TEXT.value == sync_view.sync_code_error_message, f'Wrong sync code message did not appear' + assert str(SyncingSettings.SYNC_CODE_IS_WRONG_TEXT.value == sync_view.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') diff --git a/test/e2e/tests/onboarding/test_password_strength.py b/test/e2e/tests/onboarding/test_password_strength.py index c10b1381d8..585435b4f7 100644 --- a/test/e2e/tests/onboarding/test_password_strength.py +++ b/test/e2e/tests/onboarding/test_password_strength.py @@ -6,7 +6,7 @@ from helpers.OnboardingHelper import open_generate_new_keys_view from . import marks from constants.onboarding import very_weak_lower_elements, very_weak_upper_elements, \ - very_weak_numbers_elements, very_weak_symbols_elements, weak_elements, so_so_elements, good_elements, great_elements + very_weak_numbers_elements, very_weak_symbols_elements, weak_elements, okay_elements, good_elements, strong_elements pytestmark = marks @@ -20,9 +20,9 @@ def test_check_password_strength_and_login(main_window, user_account): ('1234567890', very_weak_numbers_elements), ('+_!!!!!!!!', very_weak_symbols_elements), ('+1_3!48888', weak_elements), - ('+1_3!48a11', so_so_elements), + ('+1_3!48a11', okay_elements), ('+1_3!48aT1', good_elements), - ('+1_3!48aTq', great_elements)] + ('+1_3!48aTq', strong_elements)] expected_password = "" keys_screen = open_generate_new_keys_view() @@ -38,7 +38,7 @@ def test_check_password_strength_and_login(main_window, user_account): 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 create_password_view.strength_indicator_text == expected_indicator[0] + 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 diff --git a/ui/imports/shared/views/SyncingEnterCode.qml b/ui/imports/shared/views/SyncingEnterCode.qml index 71e15e11b9..88aed26f9c 100644 --- a/ui/imports/shared/views/SyncingEnterCode.qml +++ b/ui/imports/shared/views/SyncingEnterCode.qml @@ -44,10 +44,12 @@ ColumnLayout { currentIndex: 0 StatusSwitchTabButton { + objectName: "firstTab_StatusSwitchTabButton" text: root.firstTabName } StatusSwitchTabButton { + objectName: "secondTab_StatusSwitchTabButton" text: root.secondTabName } } @@ -113,6 +115,7 @@ ColumnLayout { text: qsTr("Ensure both devices are on the same local network") } StatusButton { + objectName: "continue_StatusButton" Layout.alignment: Qt.AlignHCenter Layout.topMargin: Theme.padding text: qsTr("Continue")