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)
|
|
|
|
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):
|
|
|
|
self._acknowledge_checkbox.set(True)
|
2024-03-13 08:44:28 +00:00
|
|
|
self._terms_of_use_checkBox.set(True)
|
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()
|