test(onboarding): Improved validation after login
Added validation of empty chat panel image to check that `StatusMainScreen` is ready.
This commit is contained in:
parent
4b2f2c32ad
commit
1da0cf9c79
|
@ -41,6 +41,7 @@ class MainScreenComponents(Enum):
|
||||||
SPLASH_SCREEN = "splashScreen"
|
SPLASH_SCREEN = "splashScreen"
|
||||||
TOOLBAR_BACK_BUTTON = "main_toolBar_back_button"
|
TOOLBAR_BACK_BUTTON = "main_toolBar_back_button"
|
||||||
LEAVE_CHAT_MENUITEM = "leaveChatMenuItem"
|
LEAVE_CHAT_MENUITEM = "leaveChatMenuItem"
|
||||||
|
EMPTY_CHAT_PANEL_IMAGE = "mainWindow_emptyChatPanelImage"
|
||||||
|
|
||||||
class ProfilePopup(Enum):
|
class ProfilePopup(Enum):
|
||||||
USER_IMAGE = "ProfileHeader_userImage"
|
USER_IMAGE = "ProfileHeader_userImage"
|
||||||
|
@ -60,12 +61,13 @@ class ChatNamePopUp(Enum):
|
||||||
class StatusMainScreen:
|
class StatusMainScreen:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
verify_screen(MainScreenComponents.PUBLIC_CHAT_ICON.value)
|
verify_screen(MainScreenComponents.EMPTY_CHAT_PANEL_IMAGE.value)
|
||||||
|
|
||||||
# Main screen is ready to interact with it (Splash screen animation not present and no banners on top of the screen)
|
# Main screen is ready to interact with it (Splash screen animation not present and no banners on top of the screen)
|
||||||
def is_ready(self):
|
def is_ready(self):
|
||||||
self.wait_for_splash_animation_ends()
|
self.wait_for_splash_animation_ends()
|
||||||
self.close_banners()
|
self.close_banners()
|
||||||
|
verify(is_displayed(MainScreenComponents.EMPTY_CHAT_PANEL_IMAGE.value), "Verifying if empty chat panel image is displayed")
|
||||||
|
|
||||||
def wait_for_splash_animation_ends(self, timeoutMSec: int = 10000):
|
def wait_for_splash_animation_ends(self, timeoutMSec: int = 10000):
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|
|
@ -17,6 +17,8 @@ splashScreen = {"container": statusDesktop_mainWindow, "objectName": "splashScre
|
||||||
navBarListView_Chat_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Chat-navbar", "type": "StatusNavBarTabButton", "visible": True}
|
navBarListView_Chat_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Chat-navbar", "type": "StatusNavBarTabButton", "visible": True}
|
||||||
mainWindow_StatusToolBar = {"container": statusDesktop_mainWindow, "objectName": "statusToolBar", "type": "StatusToolBar", "visible": True}
|
mainWindow_StatusToolBar = {"container": statusDesktop_mainWindow, "objectName": "statusToolBar", "type": "StatusToolBar", "visible": True}
|
||||||
main_toolBar_back_button = {"container": mainWindow_StatusToolBar, "objectName": "toolBarBackButton", "type": "StatusFlatButton", "visible": True}
|
main_toolBar_back_button = {"container": mainWindow_StatusToolBar, "objectName": "toolBarBackButton", "type": "StatusFlatButton", "visible": True}
|
||||||
|
mainWindow_emptyChatPanelImage = {"container": statusDesktop_mainWindow, "objectName": "emptyChatPanelImage", "type": "Image", "visible": True}
|
||||||
|
|
||||||
|
|
||||||
# main right panel
|
# main right panel
|
||||||
mainWindow_RighPanel= {"container": statusDesktop_mainWindow, "type": "ColumnLayout", "objectName": "mainRightView", "visible": True}
|
mainWindow_RighPanel= {"container": statusDesktop_mainWindow, "type": "ColumnLayout", "objectName": "mainRightView", "visible": True}
|
||||||
|
|
|
@ -18,6 +18,7 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: walkieTalkieImage
|
id: walkieTalkieImage
|
||||||
|
objectName: "emptyChatPanelImage"
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
source: Style.png("chat/chat@2x")
|
source: Style.png("chat/chat@2x")
|
||||||
|
|
Loading…
Reference in New Issue