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
|
2024-02-13 16:04:24 +07:00
|
|
|
from gui.objects_map import names
|
2023-09-04 20:36:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
class DeletePopup(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
2024-02-13 16:04:24 +07:00
|
|
|
self._delete_button = Button(names.delete_StatusButton)
|
2023-09-04 20:36:48 +02:00
|
|
|
|
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__()
|
2024-02-13 16:04:24 +07:00
|
|
|
self._delete_button = Button(names.confirm_StatusButton)
|
2024-02-16 12:08:57 +07:00
|
|
|
|
|
|
|
|
|
|
|
class DeletePermissionPopup(DeletePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self._delete_button = Button(names.confirm_permission_delete_StatusButton)
|
2024-03-19 17:17:28 +07:00
|
|
|
|
|
|
|
class DeleteMessagePopup(DeletePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self._delete_button = Button(names.confirm_delete_message_StatusButton)
|