2023-09-04 20:36:48 +02:00
|
|
|
import allure
|
|
|
|
|
|
|
|
from gui.components.base_popup import BasePopup
|
2023-10-06 10:33:42 +02:00
|
|
|
from gui.elements.button import Button
|
2023-09-04 20:36:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
class DeletePopup(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self._delete_button = Button('delete_StatusButton')
|
|
|
|
|
2023-12-12 18:35:25 +03:00
|
|
|
@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
|
|
|
|
|
|
|
|
|
2023-12-06 19:00:09 +07:00
|
|
|
|
|
|
|
|
|
|
|
class DeleteCategoryPopup(DeletePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self._delete_button = Button('confirm_StatusButton')
|