status-desktop/test/e2e/gui/elements/check_box.py

21 lines
504 B
Python
Raw Normal View History

import logging
import allure
import configs
import driver
from gui.elements.object import QObject
LOG = logging.getLogger(__name__)
class CheckBox(QObject):
@allure.step("Set {0} value: {1}")
2024-03-13 08:44:28 +00:00
def set(self, value: bool):
if self.is_checked is not value:
2024-03-13 08:44:28 +00:00
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)