2023-09-22 08:44:29 +00:00
|
|
|
import allure
|
|
|
|
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.button import Button
|
|
|
|
from gui.elements.object import QObject
|
2024-02-28 12:48:42 +00:00
|
|
|
from gui.objects_map import names, communities_names
|
2023-09-22 08:44:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ChangesDetectedToastMessage(QObject):
|
|
|
|
|
|
|
|
def __init__(self):
|
2023-10-09 17:04:29 +00:00
|
|
|
super(ChangesDetectedToastMessage, self).__init__(
|
2024-02-13 09:04:24 +00:00
|
|
|
names.mainWindow_settingsDirtyToastMessage_SettingsDirtyToastMessage)
|
2024-02-14 10:04:51 +00:00
|
|
|
self._save_button = Button(names.mainWindow_Save_changes_StatusButton)
|
2023-09-22 08:44:29 +00:00
|
|
|
|
|
|
|
@allure.step('Save changes')
|
|
|
|
def save(self):
|
|
|
|
self._save_button.click()
|
|
|
|
self.wait_until_hidden()
|
2024-02-16 05:08:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PermissionsChangesDetectedToastMessage(QObject):
|
|
|
|
|
|
|
|
def __init__(self):
|
2024-02-28 12:48:42 +00:00
|
|
|
super().__init__(communities_names.editPermissionView_settingsDirtyToastMessage_SettingsDirtyToastMessage)
|
|
|
|
self._update_permission_button = Button(communities_names.editPermissionView_Save_changes_StatusButton)
|
2024-02-16 05:08:57 +00:00
|
|
|
|
|
|
|
@allure.step('Update permission')
|
|
|
|
def update_permission(self):
|
|
|
|
self._update_permission_button.click()
|
|
|
|
self.wait_until_hidden()
|