status-desktop/test/e2e/gui/components/delete_popup.py

31 lines
673 B
Python
Raw Normal View History

import allure
from gui.components.base_popup import BasePopup
from gui.elements.button import Button
class DeletePopup(BasePopup):
def __init__(self):
super().__init__()
self._delete_button = Button('delete_StatusButton')
@allure.step("Delete channel")
def delete(self, attempts: int = 2):
try:
self._delete_button.click()
except Exception as ex:
if attempts:
self.delete(attempts-1)
else:
raise ex
class DeleteCategoryPopup(DeletePopup):
def __init__(self):
super().__init__()
self._delete_button = Button('confirm_StatusButton')