chore: add verifications when checking checkboxes on modal

This commit is contained in:
Anastasiya Semenkevich 2024-08-16 17:43:35 +03:00 committed by Anastasiya
parent de7872546a
commit 589e72cdfd
1 changed files with 3 additions and 1 deletions

View File

@ -12,8 +12,8 @@ class BeforeStartedPopUp(BasePopup):
def __init__(self): def __init__(self):
super(BeforeStartedPopUp, self).__init__() super(BeforeStartedPopUp, self).__init__()
self._acknowledge_checkbox = CheckBox(names.acknowledge_checkbox) self._acknowledge_checkbox = CheckBox(names.acknowledge_checkbox)
self._acknowledgeIndicator = QObject(names.acknowledgeIndicator)
self._terms_of_use_checkBox = CheckBox(names.termsOfUseCheckBox_StatusCheckBox) self._terms_of_use_checkBox = CheckBox(names.termsOfUseCheckBox_StatusCheckBox)
self._acknowledgeIndicator = QObject(names.acknowledgeIndicator)
self._termsOfUseIndicator = QObject(names.termsOfUseIndicator) self._termsOfUseIndicator = QObject(names.termsOfUseIndicator)
self._get_started_button = Button(names.getStartedStatusButton_StatusButton) self._get_started_button = Button(names.getStartedStatusButton_StatusButton)
self._terms_of_use_link = QObject(names.termsOfUseLink_StatusBaseText) self._terms_of_use_link = QObject(names.termsOfUseLink_StatusBaseText)
@ -27,7 +27,9 @@ class BeforeStartedPopUp(BasePopup):
@allure.step('Allow all and get started') @allure.step('Allow all and get started')
def get_started(self): def get_started(self):
self._acknowledgeIndicator.click() self._acknowledgeIndicator.click()
assert self._acknowledge_checkbox.checkState != 0, f"Acknowledge checkbox is not checked"
self._termsOfUseIndicator.click() self._termsOfUseIndicator.click()
assert self._terms_of_use_checkBox.checkState != 0, f"ToU checkbox is not checked"
assert self._terms_of_use_link.is_visible, f"Terms of use link is missing" 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" assert self._privacy_policy_link.is_visible, f"Privacy Policy link is missing"
self._get_started_button.click() self._get_started_button.click()