2023-08-04 18:27:03 +00:00
|
|
|
import allure
|
|
|
|
|
|
|
|
from gui.components.base_popup import BasePopup
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.button import Button
|
|
|
|
from gui.elements.check_box import CheckBox
|
|
|
|
from gui.elements.object import QObject
|
2024-02-13 09:04:24 +00:00
|
|
|
from gui.objects_map import names
|
2023-08-04 18:27:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BeforeStartedPopUp(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super(BeforeStartedPopUp, self).__init__()
|
2024-02-13 09:04:24 +00:00
|
|
|
self._acknowledge_checkbox = CheckBox(names.acknowledge_checkbox)
|
|
|
|
self._terms_of_use_checkBox = CheckBox(names.termsOfUseCheckBox_StatusCheckBox)
|
2024-08-16 14:43:35 +00:00
|
|
|
self._acknowledgeIndicator = QObject(names.acknowledgeIndicator)
|
2024-06-14 09:47:39 +00:00
|
|
|
self._termsOfUseIndicator = QObject(names.termsOfUseIndicator)
|
2024-02-13 09:04:24 +00:00
|
|
|
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)
|
2023-08-04 18:27:03 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
@allure.step('Get visible attribute')
|
|
|
|
def is_visible(self) -> bool:
|
|
|
|
return self._get_started_button.is_visible
|
|
|
|
|
|
|
|
@allure.step('Allow all and get started')
|
|
|
|
def get_started(self):
|
2024-06-14 09:47:39 +00:00
|
|
|
self._acknowledgeIndicator.click()
|
2024-08-16 14:43:35 +00:00
|
|
|
assert self._acknowledge_checkbox.checkState != 0, f"Acknowledge checkbox is not checked"
|
2024-06-14 09:47:39 +00:00
|
|
|
self._termsOfUseIndicator.click()
|
2024-08-16 14:43:35 +00:00
|
|
|
assert self._terms_of_use_checkBox.checkState != 0, f"ToU checkbox is not checked"
|
2023-09-22 03:58:45 +00:00
|
|
|
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"
|
2023-08-04 18:27:03 +00:00
|
|
|
self._get_started_button.click()
|
|
|
|
self.wait_until_hidden()
|