mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-27 14:55:44 +00:00
b09504be36
* test(pytest) The driver methods added. Wrappers for UI elements added. #67 * test(pytest) Squishserver added #68 * test(pytest) Attach/Detach AUT methods added #69 * test(pytest) Main window handler added #70 * test(pytest) Save screenshot on fail added #71 * test(pytest) Wait for squishserver added #71 * test(pytest) Setup Windows #71 * Generate new keys (#11804) * test(pytest) Image comparison methods added #76 * test(pytest) Tesseract methods added #77 * test(pytest) The Methods to search color on image added #80 * test(onboarding) Test on generation new keys added #75 * test(pytest) Handlers for OS Native File dialog added #81 * test(Onboarding) Test on Profile image added #83 * Allure and TestRail integration (#11806) * test(Allure) Steps descriptions added #72 * test(TestRail) Integration #72
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
import logging
|
|
|
|
import allure
|
|
|
|
from gui.components.user_canvas import UserCanvas
|
|
from gui.elements.qt.button import Button
|
|
from gui.elements.qt.object import QObject
|
|
from gui.elements.qt.window import Window
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class LeftPanel(QObject):
|
|
|
|
def __init__(self):
|
|
super(LeftPanel, self).__init__('mainWindow_StatusAppNavBar')
|
|
self._profile_button = Button('mainWindow_ProfileNavBarButton')
|
|
|
|
@property
|
|
@allure.step('Get user badge color')
|
|
def user_badge_color(self) -> str:
|
|
return str(self._profile_button.object.badge.color.name)
|
|
|
|
@allure.step('Open user canvas')
|
|
def open_user_canvas(self) -> UserCanvas:
|
|
self._profile_button.click()
|
|
return UserCanvas().wait_until_appears()
|
|
|
|
@allure.step('Verify: User is online')
|
|
def user_is_online(self) -> bool:
|
|
return self.user_badge_color == '#4ebc60'
|
|
|
|
@allure.step('Verify: User is offline')
|
|
def user_is_offline(self):
|
|
return self.user_badge_color == '#7f8990'
|
|
|
|
@allure.step('Verify: User is set to automatic')
|
|
def user_is_set_to_automatic(self):
|
|
return self.user_badge_color == '#4ebc60'
|
|
|
|
|
|
class MainWindow(Window):
|
|
|
|
def __init__(self):
|
|
super(MainWindow, self).__init__('statusDesktop_mainWindow')
|
|
self.left_panel = LeftPanel()
|