From c67785100b732dcb832b43efbdc49b8f82f27698 Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Fri, 14 Jun 2024 12:47:39 +0300 Subject: [PATCH] chore: click indicator on before get started modal instead of checkboxes --- test/e2e/gui/components/onboarding/before_started_popup.py | 6 ++++-- test/e2e/gui/elements/check_box.py | 2 +- test/e2e/gui/main_window.py | 4 ++-- test/e2e/gui/objects_map/names.py | 2 ++ ui/StatusQ/src/StatusQ/Controls/StatusCheckBox.qml | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/e2e/gui/components/onboarding/before_started_popup.py b/test/e2e/gui/components/onboarding/before_started_popup.py index 6191b53896..b38918ea42 100644 --- a/test/e2e/gui/components/onboarding/before_started_popup.py +++ b/test/e2e/gui/components/onboarding/before_started_popup.py @@ -12,7 +12,9 @@ class BeforeStartedPopUp(BasePopup): def __init__(self): super(BeforeStartedPopUp, self).__init__() self._acknowledge_checkbox = CheckBox(names.acknowledge_checkbox) + self._acknowledgeIndicator = QObject(names.acknowledgeIndicator) self._terms_of_use_checkBox = CheckBox(names.termsOfUseCheckBox_StatusCheckBox) + self._termsOfUseIndicator = QObject(names.termsOfUseIndicator) self._get_started_button = Button(names.getStartedStatusButton_StatusButton) self._terms_of_use_link = QObject(names.termsOfUseLink_StatusBaseText) self._privacy_policy_link = QObject(names.privacyPolicyLink_StatusBaseText) @@ -24,8 +26,8 @@ class BeforeStartedPopUp(BasePopup): @allure.step('Allow all and get started') def get_started(self): - self._acknowledge_checkbox.set(True) - self._terms_of_use_checkBox.set(True) + self._acknowledgeIndicator.click() + self._termsOfUseIndicator.click() assert self._terms_of_use_link.is_visible, f"Terms of use link is missing" assert self._privacy_policy_link.is_visible, f"Privacy Policy link is missing" self._get_started_button.click() diff --git a/test/e2e/gui/elements/check_box.py b/test/e2e/gui/elements/check_box.py index 2ec2995bf1..e88aa493be 100644 --- a/test/e2e/gui/elements/check_box.py +++ b/test/e2e/gui/elements/check_box.py @@ -14,7 +14,7 @@ class CheckBox(QObject): @allure.step("Set {0} value: {1}") def set(self, value: bool): if self.is_checked is not value: - self.click(x=5, y=5) + self.click() assert driver.waitFor( lambda: self.is_checked is value, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Value not changed' LOG.info('%s: value changed to "%s"', self, value) diff --git a/test/e2e/gui/main_window.py b/test/e2e/gui/main_window.py index 1b5904a29f..41985985af 100644 --- a/test/e2e/gui/main_window.py +++ b/test/e2e/gui/main_window.py @@ -177,8 +177,8 @@ class MainWindow(Window): @allure.step('Sign Up user') def sign_up(self, user_account: UserAccount = constants.user.user_account_one): BeforeStartedPopUp().get_started() - wellcome_screen = WelcomeToStatusView().wait_until_appears() - profile_view = wellcome_screen.get_keys().generate_new_keys() + 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) diff --git a/test/e2e/gui/objects_map/names.py b/test/e2e/gui/objects_map/names.py index 4880c347b9..ebcc8168a1 100644 --- a/test/e2e/gui/objects_map/names.py +++ b/test/e2e/gui/objects_map/names.py @@ -43,7 +43,9 @@ o_StatusListView = {"container": statusDesktop_mainWindow_overlay, "type": "Stat """ Onboarding """ # Before you get started Popup acknowledge_checkbox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "acknowledgeCheckBox", "type": "StatusCheckBox", "visible": True} +acknowledgeIndicator = {"container": acknowledge_checkbox, "objectName": "indicator", "type": "Item", "visible": True} termsOfUseCheckBox_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName":"termsOfUseCheckBox", "type": "StatusCheckBox", "visible": True} +termsOfUseIndicator = {"container": termsOfUseCheckBox_StatusCheckBox, "objectName": "indicator", "type": "Item", "visible": True} getStartedStatusButton_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "getStartedStatusButton", "type": "StatusButton", "visible": True} termsOfUseLink_StatusBaseText = {"container": statusDesktop_mainWindow_overlay, "objectName": "termsOfUseLink", "type": "StatusBaseText", "visible": True} privacyPolicyLink_StatusBaseText = {"container": statusDesktop_mainWindow_overlay, "objectName": "privacyPolicyLink", "type": "StatusBaseText", "visible": True} diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusCheckBox.qml b/ui/StatusQ/src/StatusQ/Controls/StatusCheckBox.qml index 18c6221245..05d16c1b0e 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusCheckBox.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusCheckBox.qml @@ -43,6 +43,7 @@ CheckBox { font.pixelSize: size === StatusCheckBox.Size.Regular ? 15 : 13 indicator: Rectangle { + objectName: "indicator" anchors.left: root.leftSide? parent.left : undefined anchors.right: !root.leftSide? parent.right : undefined implicitWidth: size === StatusCheckBox.Size.Regular