parent
7e4419d239
commit
219eb04da9
|
@ -19,7 +19,6 @@ class BaseElement:
|
|||
def object(self):
|
||||
return squish.waitForObject(self.object_name)
|
||||
|
||||
|
||||
@property
|
||||
def existent(self):
|
||||
return squish.waitForObjectExists(self.object_name)
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
# * \date February 2022
|
||||
# * \brief It defines the status login screen behavior and properties.
|
||||
# *****************************************************************************/
|
||||
|
||||
from enum import Enum
|
||||
|
||||
import configs
|
||||
from drivers.SquishDriver import *
|
||||
from drivers.SquishDriverVerification import *
|
||||
from screens.StatusAccountsScreen import StatusAccountsScreen
|
||||
|
@ -62,6 +62,7 @@ class StatusLoginScreen():
|
|||
click_obj_by_name(SLoginComponents.SUBMIT_BTN.value)
|
||||
|
||||
def verify_error_message_is_displayed(self):
|
||||
SplashScreen().wait_until_appears().wait_until_hidden(configs.squish.APP_LOAD_TIMEOUT_MSEC)
|
||||
verify_object_enabled(SLoginComponents.ERR_MSG_LABEL.value)
|
||||
|
||||
def get_accounts_selector_popup(self):
|
||||
|
|
|
@ -8,13 +8,68 @@
|
|||
# * \brief Sign Up and Login for new users to the app.
|
||||
# *****************************************************************************/
|
||||
|
||||
from array import array
|
||||
from enum import Enum
|
||||
import sys
|
||||
from abc import abstractmethod
|
||||
from enum import Enum
|
||||
|
||||
import common.Common as common
|
||||
from common.SeedUtils import *
|
||||
from drivers.SquishDriver import *
|
||||
from drivers.SquishDriverVerification import *
|
||||
from common.SeedUtils import *
|
||||
import common.Common as common
|
||||
|
||||
|
||||
class OnboardingBaseScreen(BaseElement):
|
||||
|
||||
def __init__(self, object_name):
|
||||
super(OnboardingBaseScreen, self).__init__(object_name)
|
||||
self._back_button = Button('onboarding_back_button')
|
||||
|
||||
@abstractmethod
|
||||
def back(self):
|
||||
pass
|
||||
|
||||
|
||||
class CreatePasswordView(OnboardingBaseScreen):
|
||||
|
||||
def __init__(self):
|
||||
super(CreatePasswordView, self).__init__('mainWindow_CreatePasswordView')
|
||||
self._new_password_text_field = TextEdit('onboarding_newPsw_Input')
|
||||
self._confirm_password_text_field = TextEdit('onboarding_confirmPsw_Input')
|
||||
self._create_button = Button('onboarding_create_password_button')
|
||||
self._password_strength_indicator = BaseElement('onboarding_strengthInditactor')
|
||||
|
||||
@property
|
||||
def new_password(self) -> str:
|
||||
return self._new_password_text_field.text
|
||||
|
||||
@new_password.setter
|
||||
def new_password(self, value: str):
|
||||
self._new_password_text_field.text = value
|
||||
|
||||
@property
|
||||
def confirm_password(self) -> str:
|
||||
return self._new_password_text_field.text
|
||||
|
||||
@confirm_password.setter
|
||||
def confirm_password(self, value: str):
|
||||
self._new_password_text_field.text = value
|
||||
|
||||
@property
|
||||
def password_strength_indicator(self):
|
||||
return self._password_strength_indicator.image
|
||||
|
||||
def is_password_strength_indicator_equal(self, indicator : str):
|
||||
verify_text_matching(self._password_strength_indicator.symbolic_name, indicator)
|
||||
|
||||
def create_password(self, value: str):
|
||||
self.new_password.text = value
|
||||
self.confirm_password.text = value
|
||||
self._create_button.click()
|
||||
# TODO: return Confirm Password View
|
||||
|
||||
def back(self):
|
||||
self._back_button.click()
|
||||
# TODO: return Details View
|
||||
|
||||
|
||||
class AgreementPopUp(Enum):
|
||||
|
@ -23,6 +78,7 @@ class AgreementPopUp(Enum):
|
|||
TERMS_OF_USE_CHECK_BOX: str = "termsOfUseCheckBox_StatusCheckBox"
|
||||
GET_STARTED_BUTTON: str = "getStartedStatusButton_StatusButton"
|
||||
|
||||
|
||||
class SignUpComponents(Enum):
|
||||
NEW_TO_STATUS: str = "mainWindow_I_am_new_to_Status_StatusBaseText"
|
||||
GENERATE_NEW_KEYS: str = "keysMainView_PrimaryAction_Button"
|
||||
|
@ -44,6 +100,7 @@ class SignUpComponents(Enum):
|
|||
WELCOME_SCREEN_CHAT_KEY_TEXT: str = "mainWindow_WelcomeScreen_ChatKeyText"
|
||||
BACK_BTN: str = "onboarding_back_button"
|
||||
|
||||
|
||||
class SeedPhraseComponents(Enum):
|
||||
IMPORT_A_SEED_TEXT: str = "import_a_seed_phrase_StatusBaseText"
|
||||
INVALID_SEED_TEXT: str = "onboarding_InvalidSeed_Text"
|
||||
|
@ -54,6 +111,7 @@ class SeedPhraseComponents(Enum):
|
|||
SEEDS_WORDS_TEXTFIELD_template: str = "onboarding_SeedPhrase_Input_TextField_"
|
||||
SUBMIT_BUTTON: str = "seedPhraseView_Submit_Button"
|
||||
|
||||
|
||||
class PasswordStrengthPossibilities(Enum):
|
||||
LOWER_VERY_WEAK = "lower_very_weak"
|
||||
UPPER_VERY_WEAK = "upper_very_weak"
|
||||
|
@ -64,14 +122,17 @@ class PasswordStrengthPossibilities(Enum):
|
|||
NUMBERS_SYMBOLS_LOWER_UPPER_GOOD = "numbers_symbols_lower_upper_good"
|
||||
NUMBERS_SYMBOLS_LOWER_UPPER_GREAT = "numbers_symbols_lower_upper_great"
|
||||
|
||||
|
||||
class MainScreen(Enum):
|
||||
SETTINGS_BUTTON = "settings_navbar_settings_icon_StatusIcon"
|
||||
|
||||
|
||||
class LoginView(Enum):
|
||||
LOGIN_VIEW_USER_IMAGE: str = "loginView_userImage"
|
||||
PASSWORD_INPUT = "loginView_passwordInput"
|
||||
SUBMIT_BTN = "loginView_submitBtn"
|
||||
|
||||
|
||||
class StatusWelcomeScreen:
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
@ -3,9 +3,14 @@ from scripts.global_names import *
|
|||
# Main:
|
||||
mainWindow_Welcome_to_Status_StyledText = {"container": statusDesktop_mainWindow, "text": "Welcome to Status", "type": "StyledText", "unnamed": 1, "visible": True}
|
||||
mainWindow_startupOnboarding_OnboardingLayout = {"container": statusDesktop_mainWindow, "objectName": "startupOnboardingLayout", "type": "OnboardingLayout", "visible": True}
|
||||
onboarding_newPsw_Input = {"container": statusDesktop_mainWindow, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True}
|
||||
onboarding_confirmPsw_Input = {"container": statusDesktop_mainWindow, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True}
|
||||
onboarding_create_password_button = {"container": statusDesktop_mainWindow, "objectName": "onboardingCreatePasswordButton", "type": "StatusButton"}
|
||||
|
||||
# Create Password View
|
||||
mainWindow_CreatePasswordView = {"container": statusDesktop_mainWindow, "type": "CreatePasswordView", "unnamed": 1, "visible": True}
|
||||
onboarding_newPsw_Input = {"container": mainWindow_CreatePasswordView, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True}
|
||||
onboarding_confirmPsw_Input = {"container": mainWindow_CreatePasswordView, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True}
|
||||
onboarding_create_password_button = {"container": mainWindow_CreatePasswordView, "objectName": "onboardingCreatePasswordButton", "type": "StatusButton"}
|
||||
onboarding_strengthInditactor = {"container": mainWindow_CreatePasswordView, "type": "StatusPasswordStrengthIndicator", "unnamed": 1, "visible": True}
|
||||
|
||||
onboarding_confirmPswAgain_Input = {"container": statusDesktop_mainWindow, "objectName": "confirmAgainPasswordInput", "type": "StatusPasswordInput", "visible": True}
|
||||
onboarding_finalise_password_button = {"container": statusDesktop_mainWindow, "objectName": "confirmPswSubmitBtn", "type": "StatusButton"}
|
||||
acknowledge_checkbox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "acknowledgeCheckBox", "type": "StatusCheckBox", "visible": True}
|
||||
|
|
|
@ -55,7 +55,6 @@ communities_StatusNavigationListItem = {"container": mainWindow_ScrollView, "obj
|
|||
profile_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.PROFILE.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
messaging_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.MESSAGING.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
|
||||
|
||||
# Profile Settings:
|
||||
mainWindow_MyProfileView = {"container": statusDesktop_mainWindow, "type": "MyProfileView", "unnamed": 1, "visible": True}
|
||||
displayName_StatusInput = {"container": statusDesktop_mainWindow, "objectName": "displayNameInput", "type": "StatusInput", "visible": True}
|
||||
|
@ -86,7 +85,6 @@ add_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_ov
|
|||
linksView = {"container": statusDesktop_mainWindow, "id": "linksView", "type": "StatusListView", "unnamed": 1, "visible": True}
|
||||
edit_TextEdit = {"container": statusDesktop_mainWindow_overlay, "id": "edit", "type": "TextEdit", "unnamed": 1, "visible": True}
|
||||
|
||||
|
||||
# Wallet Settings:
|
||||
settings_Wallet_MainView_GeneratedAccounts = {"container": statusDesktop_mainWindow, "objectName":'generatedAccounts', "type": 'ListView'}
|
||||
settings_Wallet_AccountView_DeleteAccount = {"container": statusDesktop_mainWindow, "type": "StatusButton", "objectName": "deleteAccountButton"}
|
||||
|
@ -170,4 +168,3 @@ change_password_menu_new_password = {"container": statusDesktop_mainWindow_overl
|
|||
change_password_menu_new_password_confirm = {"container": statusDesktop_mainWindow_overlay, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True}
|
||||
change_password_menu_submit_button = {"container": statusDesktop_mainWindow_overlay, "objectName": "changePasswordModalSubmitButton", "type": "StatusButton", "visible": True}
|
||||
change_password_success_menu_sign_out_quit_button = {"container": statusDesktop_mainWindow_overlay, "objectName": "changePasswordSuccessModalSignOutAndQuitButton", "type": "StatusButton", "visible": True}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
|
||||
import configs
|
||||
from screens.StatusLoginScreen import StatusLoginScreen
|
||||
|
||||
|
||||
_loginScreen = StatusLoginScreen()
|
||||
|
||||
#########################
|
||||
|
@ -23,8 +26,6 @@ def step(context, username, password):
|
|||
|
||||
@Then("the user is NOT able to login to Status Desktop application")
|
||||
def step(context):
|
||||
_main_screen = StatusMainScreen()
|
||||
_main_screen.wait_for_splash_animation_ends()
|
||||
_loginScreen.verify_error_message_is_displayed()
|
||||
|
||||
###########################################################################
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
from screens.StatusWelcomeScreen import StatusWelcomeScreen
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from screens.StatusWelcomeScreen import CreatePasswordView
|
||||
|
||||
_welcome_screen = CreatePasswordView()
|
||||
|
||||
|
||||
@When('the user inputs the password \"|any|\"')
|
||||
def step(context, password):
|
||||
_welcome_screen.new_password = str(password)
|
||||
|
||||
_welcomeScreen = StatusWelcomeScreen()
|
||||
|
||||
@Then("the password strength indicator is \"|any|\"")
|
||||
def step(context, strength):
|
||||
|
|
|
@ -6,7 +6,6 @@ Feature: Status Desktop Sign Up with seed phrase, negative cases
|
|||
|
||||
The feature start sequence follows the global one (setup on global `bdd_hooks`): No additional steps
|
||||
|
||||
@mayfail
|
||||
Scenario: User signs up with wrong imported seed phrase
|
||||
|
||||
Given A first time user lands on the status desktop and navigates to import seed phrase
|
||||
|
|
|
@ -29,7 +29,6 @@ Feature: Status Desktop login
|
|||
| username | password |
|
||||
| Athletic_Prime | TesTEr16843/!@00 |
|
||||
|
||||
@mayfail
|
||||
Scenario Outline: User tries to login with an invalid password
|
||||
Given A first time user lands on the status desktop and generates new key
|
||||
And the user signs up with username "<username>" and password "<password>"
|
||||
|
|
|
@ -23,7 +23,6 @@ Feature: Status Desktop Sign Up
|
|||
Then the user lands on the signed in app
|
||||
And the user is online
|
||||
|
||||
@mayfail
|
||||
Scenario Outline: The user signs up with imported seed phrase and and its state is online
|
||||
Given A first time user lands on the status desktop and navigates to import seed phrase
|
||||
When the user inputs the seed phrase "<seed>"
|
||||
|
@ -39,6 +38,7 @@ Feature: Status Desktop Sign Up
|
|||
| provide between target maze travel enroll edge churn random sight grass lion diet sugar cable fiction reflect reason gaze camp tone maximum task unlock | 0xCb59031d11D233112CB57DFd667fE1FF6Cd7b6Da |
|
||||
|
||||
@mayfail
|
||||
# https://github.com/status-im/status-desktop/issues/10069
|
||||
Scenario: The user signs up with a profile image
|
||||
Given A first time user lands on the status desktop and generates new key
|
||||
And the user signs up with profileImage "doggo.jpeg", username "tester123" and password "TesTEr16843/!@00"
|
||||
|
|
|
@ -153,6 +153,7 @@ StatusWindow {
|
|||
if(state === Constants.appState.startup) {
|
||||
// we're here only in case of error when we're returning from the app loading state
|
||||
loader.sourceComponent = undefined
|
||||
appLoadingAnimation.active = false
|
||||
startupOnboarding.visible = true
|
||||
}
|
||||
else if(state === Constants.appState.appLoading) {
|
||||
|
|
Loading…
Reference in New Issue