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

31 lines
977 B
Python

import allure
from gui.elements.button import Button
from gui.elements.object import QObject
from gui.objects_map import names
class ChangesDetectedToastMessage(QObject):
def __init__(self):
super(ChangesDetectedToastMessage, self).__init__(
names.mainWindow_settingsDirtyToastMessage_SettingsDirtyToastMessage)
self._save_button = Button(names.mainWindow_Save_changes_StatusButton)
@allure.step('Save changes')
def save(self):
self._save_button.click()
self.wait_until_hidden()
class PermissionsChangesDetectedToastMessage(QObject):
def __init__(self):
super().__init__(names.editPermissionView_settingsDirtyToastMessage_SettingsDirtyToastMessage)
self._update_permission_button = Button(names.editPermissionView_Save_changes_StatusButton)
@allure.step('Update permission')
def update_permission(self):
self._update_permission_button.click()
self.wait_until_hidden()