test(suite_settings): fix tests (#10265)

#9284
This commit is contained in:
Vladimir Druzhinin 2023-05-03 18:23:12 +02:00 committed by GitHub
parent 0323325231
commit 7ec7047e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 174 additions and 97 deletions

View File

@ -0,0 +1 @@
from . import squish

View File

@ -0,0 +1,3 @@
UI_LOAD_TIMEOUT_MSEC = 5000
APP_LOAD_TIMEOUT_MSEC = 60000

View File

@ -503,8 +503,8 @@ def sleep_test(seconds: float):
squish.snooze(seconds)
def wait_for(py_condition_to_check: str, timeout_msec: int = 500):
squish.waitFor(py_condition_to_check, timeout_msec)
def wait_for(py_condition_to_check: str, timeout_msec: int = 500) -> bool:
return squish.waitFor(lambda: py_condition_to_check, timeout_msec)
def wait_until_hidden(object_name: str, timeout_msec: int = _MAX_WAIT_OBJ_TIMEOUT) -> bool:

View File

@ -1,5 +1,6 @@
import typing
import configs
import names
import object
import squish
@ -8,7 +9,11 @@ import squish
class BaseElement:
def __init__(self, object_name):
self.symbolic_name = object_name
self.object_name = getattr(names, object_name)
def __str__(self):
return f'{type(self).__qualname__}({self.symbolic_name})'
@property
def object(self):
@ -42,8 +47,8 @@ class BaseElement:
@property
def is_visible(self) -> bool:
try:
return squish.waitForObject(self.object_name, 500).visible
except LookupError:
return squish.waitForObject(self.object_name, 0).visible
except (AttributeError, LookupError, RuntimeError):
return False
def click(
@ -59,9 +64,9 @@ class BaseElement:
button or squish.MouseButton.LeftButton
)
def wait_utill_appears(self, timeout_sec: int = 5):
assert squish.waitFor(lambda: self.is_visible, timeout_sec * 1000), 'Object is not visible'
def wait_until_appears(self, timeout_msec: int = configs.squish.UI_LOAD_TIMEOUT_MSEC):
assert squish.waitFor(lambda: self.is_visible, timeout_msec), f'Object {self} is not visible'
return self
def wait_utill_hidden(self, timeout_sec: int = 5):
assert squish.waitFor(lambda: not self.is_visible, timeout_sec * 1000), 'Object is not hidden'
def wait_until_hidden(self, timeout_msec: int = configs.squish.UI_LOAD_TIMEOUT_MSEC):
assert squish.waitFor(lambda: not self.is_visible, timeout_msec), f'Object {self} is not hidden'

View File

@ -16,6 +16,7 @@ class TextEdit(BaseElement):
assert squish.waitFor(lambda: self.text == value)
def type_text(self, value: str):
self.click()
squish.type(self.object, value)
assert squish.waitFor(lambda: self.text == value), \
f'Type text failed, value in field: "{self.text}", expected: {value}'

View File

@ -23,8 +23,27 @@ from .components.cahange_password_popup import ChangePasswordPopup
from .components.social_links_popup import SocialLinksPopup
class SettingsScreenComponents(Enum):
SAVE_BUTTON: str = "settingsSave_StatusButton"
class SignOutPopup(BaseElement):
def __init__(self):
super(SignOutPopup, self).__init__('statusDesktop_mainWindow_overlay')
self._sign_out_quit_button = Button('signOutConfirmation_StatusButton')
def sign_out_and_quit(self):
self._sign_out_quit_button.click()
class MenuPanel(BaseElement):
def __init__(self):
super(MenuPanel, self).__init__('mainWindow_LeftTabView')
self._scroll = Scroll('LeftTabView_ScrollView')
self._back_up_seed_phrase_item = Button('sign_out_Quit_StatusNavigationListItem')
def sign_out_and_quit(self):
self._scroll.vertical_scroll_to(self._back_up_seed_phrase_item)
self._back_up_seed_phrase_item.click()
SignOutPopup().wait_until_appears().sign_out_and_quit()
class SidebarComponents(Enum):
@ -94,10 +113,6 @@ class WalletSettingsScreen(Enum):
BACKUP_SEED_PHRASE_BUTTON: str = "settings_Wallet_MainView_BackupSeedPhrase"
class ConfirmationDialog(Enum):
SIGN_OUT_CONFIRMATION: str = "signOutConfirmation_StatusButton"
class CommunitiesSettingsScreen(Enum):
LIST_PANEL: str = "settings_Communities_CommunitiesListPanel"
LEAVE_COMMUNITY_BUTTONS: str = "settings_Communities_MainView_LeaveCommunityButtons"
@ -124,6 +139,7 @@ class SettingsScreen:
def __init__(self):
verify_screen(SidebarComponents.ADVANCED_OPTION.value)
self.menu = MenuPanel()
self._profile_view = ProfileSettingsView()
self._profile_button = Button('profile_StatusNavigationListItem')
@ -233,11 +249,6 @@ class SettingsScreen:
return index
return -1
def sign_out_and_quit_the_app(self, pid: int):
SettingsScreen.__pid = pid
click_obj_by_name(SidebarComponents.SIGN_OUT_AND_QUIT_OPTION.value)
click_obj_by_name(ConfirmationDialog.SIGN_OUT_CONFIRMATION.value)
def verify_the_app_is_closed(self):
verify_the_app_is_closed(SettingsScreen.__pid)
@ -383,9 +394,9 @@ class ProfileSettingsView(BaseElement):
def __init__(self):
super(ProfileSettingsView, self).__init__('mainWindow_MyProfileView')
self._scroll_view = Scroll('settingsContentBase_ScrollView')
self._display_name_text_field = TextEdit('displayName_TextEdit')
self._bio_text_field = TextEdit('bio_TextEdit')
self._scroll_view = Scroll('settingsContentBase_ScrollView')
self._add_more_links_label = TextLabel('addMoreSocialLinks')
self._save_button = Button('settingsSave_StatusButton')
self._links_list = BaseElement('linksView')
@ -447,9 +458,10 @@ class ProfileSettingsView(BaseElement):
def open_social_links_popup(self):
self._scroll_view.vertical_scroll_to(self._add_more_links_label)
self._add_more_links_label.click()
return SocialLinksPopup().wait_utill_appears()
return SocialLinksPopup().wait_until_appears()
def verify_display_name(self, display_name: str):
self._scroll_view.vertical_scroll_to(self._display_name_text_field)
compare_text(display_name, self.display_name)
def verify_bio(self, bio: str):
@ -484,4 +496,4 @@ class ProfileSettingsView(BaseElement):
def open_change_password_popup(self):
self._scroll_view.vertical_scroll_to(self._change_password_button)
self._change_password_button.click()
return ChangePasswordPopup().wait_utill_appears()
return ChangePasswordPopup().wait_until_appears()

View File

@ -9,15 +9,17 @@
# *****************************************************************************/
from enum import Enum
from screens.StatusAccountsScreen import StatusAccountsScreen
from drivers.SquishDriver import *
from drivers.SquishDriverVerification import *
from screens.StatusAccountsScreen import StatusAccountsScreen
from .components.splash_screen import SplashScreen
# It defines the identifier for each Login View component:
class SLoginComponents(Enum):
MAIN_VIEW = "loginView_main"
PASSWORD_INPUT = "loginView_passwordInput"
SUBMIT_BTN = "loginView_submitBtn"
CHANGE_ACCOUNT_BTN = "loginView_changeAccountBtn"
CURRENT_USERNAME_LABEL = "loginView_currentUserNameLabel"
@ -38,10 +40,11 @@ class StatusLoginScreen():
def __init__(self):
verify_screen(SLoginComponents.MAIN_VIEW.value)
self._password_text_edit = TextEdit('loginView_passwordInput')
def login(self, account, password):
self.select_account(account)
self.enter_password(password)
self.enter_password(password)
def select_account(self, account):
if self.is_account_selected(account):
@ -55,8 +58,7 @@ class StatusLoginScreen():
return obj.text == account
def enter_password(self, password):
click_obj_by_name(SLoginComponents.PASSWORD_INPUT.value)
type_text(SLoginComponents.PASSWORD_INPUT.value, password)
self._password_text_edit.text = password
click_obj_by_name(SLoginComponents.SUBMIT_BTN.value)
def verify_error_message_is_displayed(self):
@ -72,11 +74,7 @@ class StatusLoginScreen():
return click_obj_by_name(SLoginComponents.CHANGE_ACCOUNT_BTN.value)
def get_password_placeholder_text(self):
result = ""
[loaded, obj] = is_loaded(SLoginComponents.PASSWORD_INPUT.value)
if loaded:
result = obj.placeholderText
return result
return self._password_text_edit.object.placeholderText
def get_error_message_text(self):
result = ""

View File

@ -16,6 +16,10 @@ from drivers.SDKeyboardCommands import *
from drivers.SquishDriver import *
from drivers.SquishDriverVerification import *
from utils.ObjectAccess import *
import configs
from .components.splash_screen import SplashScreen
from .components.user_canvas import UserCanvas
class MainScreenComponents(Enum):
@ -28,52 +32,72 @@ class MainScreenComponents(Enum):
START_CHAT_BTN = "mainWindow_startChat"
CHAT_LIST = "chatList"
COMMUNITY_NAVBAR_BUTTONS = "navBarListView_All_Community_Buttons"
PROFILE_SETTINGS_VIEW = "mainWindow_ProfileSettingsView"
PROFILE_NAVBAR_BUTTON = "mainWindow_ProfileNavBarButton"
USERSTATUSMENU_ALWAYS_ACTIVE_ACTION = "userContextmenu_AlwaysActiveButton"
USERSTATUSMENU_INACTIVE_ACTION = "userContextmenu_InActiveButton"
USERSTATUSMENU_AUTOMATIC_ACTION = "userContextmenu_AutomaticButton"
USERSTATUSMENU_OPEN_PROFILE_POPUP = "userContextMenu_ViewMyProfileAction"
SPLASH_SCREEN = "splashScreen"
PROFILE_SETTINGS_VIEW = "mainWindow_ProfileSettingsView"
TOOLBAR_BACK_BUTTON = "main_toolBar_back_button"
LEAVE_CHAT_MENUITEM = "leaveChatMenuItem"
CONTACTS_COLUMN_MESSAGES_HEADLINE = "mainWindow_ContactsColumn_Messages_Headline"
SECURE_YOUR_SEED_PHRASE_BANNER = "mainWindow_secureYourSeedPhraseBanner_ModuleWarning"
class ProfilePopup(Enum):
USER_IMAGE = "ProfileHeader_userImage"
DISPLAY_NAME = "ProfilePopup_displayName"
EDIT_PROFILE_BUTTON = "ProfilePopup_editButton"
class ChatNamePopUp(Enum):
CHAT_NAME_TEXT = "chat_name_PlaceholderText"
START_CHAT_BTN = "startChat_Btn"
class SharedPopup(Enum):
POPUP_CONTENT: str = "sharedPopup_Popup_Content"
PASSWORD_INPUT: str = "sharedPopup_Password_Input"
PRIMARY_BUTTON: str = "sharedPopup_Primary_Button"
def authenticate_popup_enter_password(password):
wait_for_object_and_type(SharedPopup.PASSWORD_INPUT.value, password)
click_obj_by_name(SharedPopup.PRIMARY_BUTTON.value)
class NavigationPanel(BaseElement):
def __init__(self):
super(NavigationPanel, self).__init__('mainWindow_StatusAppNavBar')
self._profile_button = Button('mainWindow_ProfileNavBarButton')
@property
def user_badge_color(self) -> str:
return str(self._profile_button.object.badge.color.name)
def open_user_canvas(self) -> UserCanvas:
self._profile_button.click()
return UserCanvas().wait_until_appears()
def user_is_online(self) -> bool:
return self.user_badge_color == '#4ebc60'
def user_is_offline(self):
return self.user_badge_color == '#7f8990'
def user_is_set_to_automatic(self):
return self.user_badge_color == '#4ebc60'
class StatusMainScreen:
def __init__(self):
verify_screen(MainScreenComponents.CONTACTS_COLUMN_MESSAGES_HEADLINE.value)
self.navigation_panel = NavigationPanel()
# Main screen is ready to interact with it (Splash screen animation not present)
def is_ready(self):
self.wait_for_splash_animation_ends()
verify(is_displayed(MainScreenComponents.CONTACTS_COLUMN_MESSAGES_HEADLINE.value, 15000), "Verifying if the Messages headline is displayed")
def wait_for_splash_animation_ends(self, timeoutMSec: int = 10000):
do_until_validation_with_timeout(
do_fn = lambda: time.sleep(0.5),
validation_fn = lambda: not is_loaded_visible_and_enabled(MainScreenComponents.SPLASH_SCREEN.value, 1000)[0],
message = "Splash screen animation has ended",
timeout_ms = timeoutMSec)
def wait_for_splash_animation_ends(self, timeoutMSec: int = configs.squish.APP_LOAD_TIMEOUT_MSEC):
SplashScreen().wait_until_appears().wait_until_hidden(timeoutMSec)
def open_chat_section(self):
click_obj_by_name(MainScreenComponents.CHAT_NAVBAR_ICON.value)
@ -125,32 +149,25 @@ class StatusMainScreen:
verify_equals(len(objects), int(expected_count))
def user_is_online(self):
profileButton = squish.waitForObject(getattr(names, MainScreenComponents.PROFILE_NAVBAR_BUTTON.value))
verify_equal(profileButton.badge.color.name, "#4ebc60", "The user is not online by default")
verify_equal(wait_for(self.navigation_panel.user_is_online(), 10000), True, "The user is not online")
def user_is_offline(self):
profileButton = squish.waitForObject(getattr(names, MainScreenComponents.PROFILE_NAVBAR_BUTTON.value))
verify_equal(profileButton.badge.color.name, "#7f8990", "The user is not offline")
verify_equal(wait_for(self.navigation_panel.user_is_offline(), 10000), True, "The user is not offline")
def user_is_set_to_automatic(self):
profileButton = squish.waitForObject(getattr(names, MainScreenComponents.PROFILE_NAVBAR_BUTTON.value))
verify_equal(profileButton.badge.color.name, "#4ebc60", "The user is not online by default")
verify_equal(wait_for(self.navigation_panel.user_is_online(), 10000), True, "The user is not autoset")
def set_user_state_offline(self):
click_obj_by_name(MainScreenComponents.PROFILE_NAVBAR_BUTTON.value)
click_obj_by_name(MainScreenComponents.USERSTATUSMENU_INACTIVE_ACTION.value)
self.navigation_panel.open_user_canvas().set_user_state_offline()
def set_user_state_online(self):
click_obj_by_name(MainScreenComponents.PROFILE_NAVBAR_BUTTON.value)
click_obj_by_name(MainScreenComponents.USERSTATUSMENU_ALWAYS_ACTIVE_ACTION.value)
self.navigation_panel.open_user_canvas().set_user_state_online()
def set_user_state_to_automatic(self):
click_obj_by_name(MainScreenComponents.PROFILE_NAVBAR_BUTTON.value)
click_obj_by_name(MainScreenComponents.USERSTATUSMENU_AUTOMATIC_ACTION.value)
self.navigation_panel.open_user_canvas().set_user_automatic_state()
def open_own_profile_popup(self):
click_obj_by_name(MainScreenComponents.PROFILE_NAVBAR_BUTTON.value)
click_obj_by_name(MainScreenComponents.USERSTATUSMENU_OPEN_PROFILE_POPUP.value)
self.navigation_panel.open_user_canvas().open_profile_popup()
def verify_profile_popup_display_name(self, display_name: str):
verify_text_matching(ProfilePopup.DISPLAY_NAME.value, display_name)
@ -178,8 +195,7 @@ class StatusMainScreen:
image_present("loginUserName", True, 95, 75, 100, True, profilePopupImage)
def profile_modal_image_is_updated(self):
click_obj_by_name(MainScreenComponents.PROFILE_NAVBAR_BUTTON.value)
click_obj_by_name(MainScreenComponents.USERSTATUSMENU_OPEN_PROFILE_POPUP.value)
self.navigation_panel.open_user_canvas().open_profile_popup()
image_present("profiletestimage", True, 97, 95, 100, True)
def profile_settings_image_is_updated(self):

View File

@ -16,4 +16,4 @@ class ChangePasswordPopup(BaseElement):
self._new_password_text_field.text = new_pwd
self._confirm_password_text_field.text = new_pwd
self._submit_button.click()
self._quit_button.click()
self._quit_button.wait_until_appears(15000).click()

View File

@ -30,4 +30,4 @@ class SocialLinksPopup(BaseElement):
for occurrence, link in enumerate(links):
self._get_text_field(occurrence).text = link
self._add_button.click()
self.wait_utill_hidden()
self.wait_until_hidden()

View File

@ -0,0 +1,7 @@
from drivers.SquishDriver import *
class SplashScreen(BaseElement):
def __init__(self):
super(SplashScreen, self).__init__('splashScreen')

View File

@ -0,0 +1,35 @@
import time
import configs
from drivers.SquishDriver import *
class UserCanvas(BaseElement):
def __init__(self):
super(UserCanvas, self).__init__('o_StatusListView')
self._always_active_button = Button('userContextmenu_AlwaysActiveButton')
self._inactive_button = Button('userContextmenu_InActiveButton')
self._automatic_button = Button('userContextmenu_AutomaticButton')
self._view_my_profile_button = Button('userContextMenu_ViewMyProfileAction')
def wait_until_appears(self, timeout_msec: int = configs.squish.UI_LOAD_TIMEOUT_MSEC):
super(UserCanvas, self).wait_until_appears(timeout_msec)
time.sleep(1)
return self
def set_user_state_online(self):
self._always_active_button.click()
self.wait_until_hidden()
def set_user_state_offline(self):
self._inactive_button.click()
self.wait_until_hidden()
def set_user_automatic_state(self):
self._automatic_button.click()
self.wait_until_hidden()
def open_profile_popup(self):
self._view_my_profile_button.click()
# TODO: Return profile popup

View File

@ -10,7 +10,7 @@ mainWindow_ScrollView_2 = {"container": statusDesktop_mainWindow, "occurrence":
mainWindow_ProfileNavBarButton = {"container": statusDesktop_mainWindow, "objectName": "statusProfileNavBarTabButton", "type": "StatusNavBarTabButton", "visible": True}
mainWindow_ProfileSettingsView = {"container": statusDesktop_mainWindow, "objectName": "myProfileSettingsView", "type": "MyProfileSettingsView", "visible": True}
settings_navbar_settings_icon_StatusIcon = {"container": mainWindow_navBarListView_ListView, "objectName": "settings-icon", "type": "StatusIcon", "visible": True}
splashScreen = {"container": statusDesktop_mainWindow, "objectName": "splashScreen", "type": "SplashScreen"}
splashScreen = {"container": statusDesktop_mainWindow, "objectName": "splashScreen", "type": "DidYouKnowSplashScreen"}
mainWindow_StatusToolBar = {"container": statusDesktop_mainWindow, "objectName": "statusToolBar", "type": "StatusToolBar", "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}
@ -20,11 +20,15 @@ mainWindow_ContactsColumn_Messages_Headline = {"container": statusDesktop_mainWi
# main right panel
mainWindow_RighPanel= {"container": statusDesktop_mainWindow, "type": "ColumnLayout", "objectName": "mainRightView", "visible": True}
# Navigation Panel
mainWindow_StatusAppNavBar = {"container": statusDesktop_mainWindow, "type": "StatusAppNavBar", "unnamed": 1, "visible": True}
# User Status Profile Menu
userContextmenu_AlwaysActiveButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAlwaysOnlineAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_InActiveButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuInactiveAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_AutomaticButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAutomaticAction", "type": "StatusMenuItem", "visible": True}
userContextMenu_ViewMyProfileAction = {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusViewMyProfileAction", "type": "StatusMenuItem", "visible": True}
o_StatusListView = {"container": statusDesktop_mainWindow_overlay, "type": "StatusListView", "unnamed": 1, "visible": True}
userContextmenu_AlwaysActiveButton= {"container": o_StatusListView, "objectName": "userStatusMenuAlwaysOnlineAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_InActiveButton= {"container": o_StatusListView, "objectName": "userStatusMenuInactiveAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_AutomaticButton= {"container": o_StatusListView, "objectName": "userStatusMenuAutomaticAction", "type": "StatusMenuItem", "visible": True}
userContextMenu_ViewMyProfileAction = {"container": o_StatusListView, "objectName": "userStatusViewMyProfileAction", "type": "StatusMenuItem", "visible": True}
# popups
modal_Close_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerCloseButton", "type": "StatusFlatRoundButton", "visible": True}

View File

@ -33,6 +33,8 @@ settingsSave_StatusButton = {"container": statusDesktop_mainWindow, "objectName"
settings_Sidebar_ENS_Item = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.ENS_USERNAMES.value, "type": "StatusNavigationListItem"}
settingsContentBase_ScrollView = {"container": statusDesktop_mainWindow, "objectName": "settingsContentBaseScrollView", "type": "StatusScrollView", "visible": True}
settingsContentBaseScrollView_Item = {"container": settingsContentBase_ScrollView, "type": "Item", "unnamed": 1, "visible": True}
mainWindow_LeftTabView = {"container": statusDesktop_mainWindow, "type": "LeftTabView", "unnamed": 1, "visible": True}
LeftTabView_ScrollView = {"container": mainWindow_LeftTabView, "type": "StatusScrollView", "unnamed": 1, "visible": True}
# ENS view;
settings_ENS_Start_Button = {"container": statusDesktop_mainWindow, "objectName": "ensStartButton", "type": "StatusButton"}
@ -158,9 +160,9 @@ backup_seed_phrase_popup_ConfirmStoringSeedPhrasePanel_storeCheck = {"container"
backup_seed_phrase_popup_BackupSeedModal_completeAndDeleteSeedPhraseButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "BackupSeedModal_completeAndDeleteSeedPhraseButton", "type": "StatusButton", "visible": True}
# User Status Profile Menu
userContextmenu_AlwaysActiveButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAlwaysOnlineAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_InActiveButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuInactiveAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_AutomaticButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAutomaticAction", "type": "StatusMenuItem", "visible": True}
userContextmenu_AlwaysActiveButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAlwaysOnlineAction", "type": "StatusMenuItem", "visible": True, "enabled": True}
userContextmenu_InActiveButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuInactiveAction", "type": "StatusMenuItem", "visible": True, "enabled": True}
userContextmenu_AutomaticButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAutomaticAction", "type": "StatusMenuItem", "visible": True, "enabled": True}
# Change Password Menu
change_password_menu_current_password = {"container": statusDesktop_mainWindow_overlay, "objectName": "passwordViewCurrentPassword", "type": "StatusPasswordInput", "visible": True}

View File

@ -31,6 +31,7 @@ _feature_name = "feature_name"
def context_init(context, testSettings, screenshot_on_fail = True):
# With this property it is enabled that every test failure will cause Squish to take a screenshot of the desktop when the failure occurred
testSettings.logScreenshotOnFail = screenshot_on_fail
testSettings.logScreenshotOnError = screenshot_on_fail
testSettings.waitForObjectTimeout = 5000
filesMngr.erase_directory(_status_qt_path)

View File

@ -133,8 +133,7 @@ def step(context, native):
@When("the user clicks on Sign out and Quit")
def step(context: any):
ctx = currentApplicationContext()
_settingsScreen.sign_out_and_quit_the_app(ctx.pid)
_settingsScreen.menu.sign_out_and_quit()
@Given("the user opens the communities settings")
@When("the user opens the communities settings")

View File

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
import time
# ******************************************************************************
# Status.im
# *****************************************************************************/
@ -14,11 +16,10 @@
# * with a pattern which is matched against the steps being executed.
# *****************************************************************************
import common.Common as common
import time
import steps.commonInitSteps as init_steps
from screens.StatusMainScreen import StatusMainScreen
from drivers.SquishDriver import start_application
from screens.StatusChatScreen import StatusChatScreen
from screens.StatusMainScreen import StatusMainScreen
_statusMain = StatusMainScreen()
_statusChat = StatusChatScreen()
@ -93,9 +94,8 @@ def step(context, obj):
###########################################################################
def the_user_restarts_the_app(context: any):
waitFor(lambda: currentApplicationContext().detach(), 500)
time.sleep(5)
startApplication(context.userData["aut_name"])
[ctx.detach() for ctx in squish.applicationContextList()]
start_application(context.userData["aut_name"])
def the_user_joins_chat_room(room: str):
init_steps.the_user_joins_chat_room(room)

View File

@ -9,7 +9,6 @@ Feature: Status Desktop Contacts Flows
And the user opens app settings screen
@mayfail
Scenario: The user can add a contact with a chat key
When the user opens the messaging settings
And the user opens the contacts settings

View File

@ -6,19 +6,14 @@ sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
import steps.commonInitSteps as init_steps
# Global properties for the specific feature
_user = "tester123"
_password = "TesTEr16843/!@00"
@OnFeatureStart
def hook(context):
init_steps.context_init(context, testSettings)
init_steps.signs_up_process_steps(context, _user, _password)
@OnFeatureEnd
@OnScenarioEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
[ctx.detach() for ctx in squish.applicationContextList()]
@OnStepEnd
def hook(context):

View File

@ -2,33 +2,32 @@ Feature: Status Desktop Main Settings Section
As a user I want to login the app go to Settings and make basic settings actions like change my online state and/or store my seed phrase.
The feature start sequence is the following (setup on its own `bdd_hooks`):
** given A first time user lands on the status desktop and generates new key
** when user signs up with username "tester123" and password "TesTEr16843/!@00"
** and the user lands on the signed in app
Background: Open settings section
Given the user opens app settings screen
Given A first time user lands on the status desktop and generates new key
And the user signs up with username "tester123" and password "TesTEr16843/!@00"
And the user lands on the signed in app
And the user opens app settings screen
Scenario: The user can backup seed phrase
When the user backs up the wallet seed phrase
Then the backup seed phrase indicator is not displayed
And the Secure Your Seed Phrase Banner is not displayed
@mayfail
Scenario: The user can switch state to offline
When the users switches state to offline
Then the user appears offline
Given the user restarts the app
And the user "tester123" logs in with password "TesTEr16843/!@00"
Then the user lands on the signed in app
Then the user appears offline
@mayfail
Scenario: The user can switch state to online
When the users switches state to offline
And the user restarts the app
And the user "tester123" logs in with password "TesTEr16843/!@00"
Then the user lands on the signed in app
Then the user appears offline
When the users switches state to online
@ -36,17 +35,19 @@ Feature: Status Desktop Main Settings Section
When the user restarts the app
And the user "tester123" logs in with password "TesTEr16843/!@00"
Then the user lands on the signed in app
Then the user appears online
@mayfail
Scenario: The user can switch state to automatic
When the users switches state to automatic
Then the user status is automatic
When the user restarts the app
And the user "tester123" logs in with password "TesTEr16843/!@00"
Then the user lands on the signed in app
Then the user status is automatic
# https://github.com/status-im/status-desktop/issues/10287
@mayfail
Scenario: The user can change the password and login with new password
When the user changes the password from TesTEr16843/!@00 to NewPassword@12345

View File

@ -10,8 +10,6 @@ Feature: Status Desktop Sign out and Quit
And the user lands on the signed in app
Given the user opens app settings screen
# TODO: Unstable. It fails sometimes reporting a FATAL error in CI execution: "The AUT did not respond to network communication"
@mayfail
Scenario: The user quits the app
When the user clicks on Sign out and Quit
Then the app is closed