2023-09-04 18:36:48 +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
|
2024-02-13 09:04:24 +00:00
|
|
|
from gui.objects_map import names
|
2023-09-04 18:36:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DeletePopup(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
2024-02-13 09:04:24 +00:00
|
|
|
self._delete_button = Button(names.delete_StatusButton)
|
2023-09-04 18:36:48 +00:00
|
|
|
|
2023-12-12 15:35:25 +00: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 12:00:09 +00:00
|
|
|
class DeleteCategoryPopup(DeletePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
2024-02-13 09:04:24 +00:00
|
|
|
self._delete_button = Button(names.confirm_StatusButton)
|
2024-02-16 05:08:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DeletePermissionPopup(DeletePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self._delete_button = Button(names.confirm_permission_delete_StatusButton)
|