test(suite_onboarding): Update bdd hooks related to the suite and suite cleanup and reorganization

- Added specific `bdd_hooks.py` for `tst_passwordStrength`.
- Updated `tst_passwordStrength` screenshots (now taken when input is focused).
- Restored `tst_statusLoginPassword` scenarios.
- `tst_statusSignUp` will only contain positive signup test case.
- Created new test case tst_signUpSeedPhraseNegativeCases`.
- Created new test case `tst_signUpNegativeCases` with specific `bdd_hooks.py`.

Closes #8013
This commit is contained in:
Noelia 2022-11-17 15:06:36 +01:00 committed by Noelia
parent 8084b90b5c
commit 80bb09cc67
30 changed files with 381 additions and 243 deletions

View File

@ -1,6 +1,7 @@
import drivers.SquishDriver as driver
import drivers.SquishDriverVerification as verification
import drivers.SDKeyboardCommands as keyCommands
def start_application(app_name: str):
driver.start_application(app_name)
@ -16,3 +17,7 @@ def object_not_enabled(objName: str):
def str_to_bool(string: str):
return string.lower() in ["yes", "true", "1", "y", "enabled"]
def clear_input_text(objName: str):
keyCommands.press_select_all(objName)
keyCommands.press_backspace(objName)

View File

@ -8,4 +8,11 @@ def press_backspace(objName: str):
type(objName, "<Backspace>")
def press_escape(objName: str):
type(objName, "<Escape>")
type(objName, "<Escape>")
def press_select_all(objName: str):
click_obj_by_name(objName)
if sys.platform == "darwin":
native_type("<Command+a>");
else:
native_type("<Ctrl+a>");

View File

@ -65,9 +65,9 @@ def is_found(objName: str):
# It waits for the object with given objectName to appear in the UI (visible and enabled):
# It returns True in case it appears without exceeding a specific timeout. Otherwise, false.
def is_displayed(objName: str):
def is_displayed(objName: str, timeout: int=_MAX_WAIT_OBJ_TIMEOUT):
try:
squish.waitForObject(getattr(names, objName))
squish.waitForObject(getattr(names, objName), timeout)
return True
except LookupError:
return False

View File

@ -15,6 +15,7 @@ from drivers.SquishDriver import *
from drivers.SquishDriverVerification import *
from common.SeedUtils import *
from screens.StatusMainScreen import MainScreenComponents
import common.Common as common
class AgreementPopUp(Enum):
@ -23,7 +24,6 @@ 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"
@ -41,6 +41,7 @@ class SignUpComponents(Enum):
PROFILE_IMAGE_CROPPER_ACCEPT_BUTTON: str = "mainWindow_WelcomeScreen_Image_Cropper_Accept_Button"
WELCOME_SCREEN_USER_PROFILE_IMAGE: str = "mainWindow_WelcomeScreen_User_Profile_Image"
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"
@ -112,6 +113,7 @@ class StatusWelcomeScreen:
message = 'Try clicking "I prefer to use password" until not visible and enabled (moved to the next screen)')
def input_username(self, username: str):
common.clear_input_text(SignUpComponents.USERNAME_INPUT.value)
type(SignUpComponents.USERNAME_INPUT.value, username)
click_obj_by_name(SignUpComponents.DETAILS_NEXT_BUTTON.value)
@ -217,7 +219,7 @@ class StatusWelcomeScreen:
imagePresent("profiletestimage", True, 97, 95, 100, True)
def profile_settings_image_is_updated(self):
# first time clicking on settings button closes the my profile modal
# first time clicking on settings button closes the my profile modal
click_obj_by_name(MainScreen.SETTINGS_BUTTON.value)
click_obj_by_name(MainScreen.SETTINGS_BUTTON.value)
imagePresent("profiletestimage", True, 97, 100, 183, True)
@ -237,5 +239,13 @@ class StatusWelcomeScreen:
def enter_password(self, password):
click_obj_by_name(LoginView.PASSWORD_INPUT.value)
type(LoginView.PASSWORD_INPUT.value, password)
click_obj_by_name(LoginView.SUBMIT_BTN.value)
click_obj_by_name(LoginView.SUBMIT_BTN.value)
def navigate_back_to_user_profile_page(self):
count = 0
while not is_displayed(SignUpComponents.USERNAME_INPUT.value, 500):
click_obj_by_name(SignUpComponents.BACK_BTN.value)
count += 1
if count > 5:
verify_failure("Error during onboarding process navigating back to user profile page")
break

View File

@ -21,6 +21,7 @@ mainWindow_WelcomeScreen_User_Profile_Image = {"container": statusDesktop_mainWi
mainWindow_WelcomeScreen_ChatKeyText = {"container": statusDesktop_mainWindow, "type": "StyledText", "objectName": "insertDetailsViewChatKeyTxt"}
mainWindow_WelcomeScreen_Image_Crop_Workflow_Item= {"container": statusDesktop_mainWindow, "type": "Item", "objectName": "imageCropWorkflow"}
mainWindow_WelcomeScreen_Image_Cropper_Accept_Button= {"container": statusDesktop_mainWindow, "type": "StatusButton", "objectName": "imageCropperAcceptButton"}
onboarding_back_button = {"container": statusDesktop_mainWindow, "objectName": "onboardingBackButton", "type": "StatusRoundButton", "visible": True}
# Seed phrase form:
import_a_seed_phrase_StatusBaseText = {"container": statusDesktop_mainWindow, "text": "Import a seed phrase", "type": "StatusBaseText", "unnamed": 1, "visible": True}

View File

@ -1,7 +1,9 @@
"""It defines starting-up or driving-the-app-into-an-idle-state static methods outside bdd context that can be reused in different `hooks` as well as in specific bdd steps files."""
from utils.FileManager import *
from common.Common import *
import os
import utils.FileManager as filesMngr
import common.Common as common
from screens.StatusWelcomeScreen import StatusWelcomeScreen
from screens.StatusMainScreen import StatusMainScreen
@ -26,7 +28,7 @@ _search_images = "search_images"
_scenario_name = "scenario_name"
def context_init(context):
erase_directory(_status_qt_path)
filesMngr.erase_directory(_status_qt_path)
context.userData = {}
context.userData[_aut_name] = _status_desktop_app_name
context.userData[_status_data_folder] = _status_data_folder_path
@ -50,13 +52,13 @@ def context_init(context):
context.userData[_fixtures_root] = os.path.join(joined_path, "fixtures/")
def a_first_time_user_lands_on(context):
erase_directory(context.userData[_status_data_folder])
start_application(context.userData[_aut_name])
filesMngr.erase_directory(context.userData[_status_data_folder])
common.start_application(context.userData[_aut_name])
def a_user_starts_the_application_with_a_specific_data_folder(context, data_folder_path):
clear_directory(context.userData["status_data_folder_path"])
copy_directory(data_folder_path, context.userData["status_data_folder_path"])
start_application(context.userData[_aut_name])
filesMngr.clear_directory(context.userData["status_data_folder_path"])
filesMngr.copy_directory(data_folder_path, context.userData["status_data_folder_path"])
common.start_application(context.userData[_aut_name])
def a_first_time_user_lands_on_and_generates_new_key(context):
a_first_time_user_lands_on(context)
@ -64,12 +66,16 @@ def a_first_time_user_lands_on_and_generates_new_key(context):
welcome_screen.agree_terms_conditions_and_generate_new_key()
def a_first_time_user_lands_on_and_navigates_to_import_seed_phrase(context):
erase_directory(context.userData[_status_data_folder])
start_application(context.userData[_aut_name])
filesMngr.erase_directory(context.userData[_status_data_folder])
filesMngr.start_application(context.userData[_aut_name])
welcome_screen = StatusWelcomeScreen()
welcome_screen.agree_terms_conditions_and_navigate_to_import_seed_phrase()
def the_user_inputs_username(username: str):
welcome_screen = StatusWelcomeScreen()
welcome_screen.input_username(username)
def the_user_signs_up(user, password):
def the_user_signs_up(user: str, password: str):
welcome_screen = StatusWelcomeScreen()
welcome_screen.input_username_and_password_and_finalize_sign_up(user, password)
@ -77,7 +83,7 @@ def the_user_lands_on_the_signed_in_app():
main_screen = StatusMainScreen()
main_screen.is_ready()
def signs_up_process_steps(context, user, password):
def signs_up_process_steps(context, user: str, password: str):
a_first_time_user_lands_on_and_generates_new_key(context)
the_user_signs_up(user, password)
the_user_lands_on_the_signed_in_app()
@ -87,20 +93,20 @@ def the_user_inputs_the_seed_phrase(seed_phrase: str):
welcome_screen.input_seed_phrase(seed_phrase)
def the_user_clicks_on_the_following_ui_component(component: str):
click_on_an_object(component)
common.click_on_an_object(component)
def signs_up_with_seed_phrase_process_steps(context, seed_phrase, user, password):
def signs_up_with_seed_phrase_process_steps(context, seed_phrase: str, user: str, password: str):
a_first_time_user_lands_on_and_navigates_to_import_seed_phrase(context)
the_user_inputs_the_seed_phrase(seed_phrase)
the_user_clicks_on_the_following_ui_component("seedPhraseView_Submit_Button")
the_user_signs_up(user, password)
the_user_lands_on_the_signed_in_app()
def the_user_joins_chat_room(_chat_room):
def the_user_joins_chat_room(chat_room: str):
main_screen = StatusMainScreen()
main_screen.join_chat_room(_chat_room)
main_screen.join_chat_room(chat_room)
chat_screen = StatusChatScreen()
chat_screen.verify_chat_title(_chat_room)
chat_screen.verify_chat_title(chat_room)
def the_user_opens_the_chat_section():
main_screen = StatusMainScreen()
@ -133,11 +139,16 @@ def the_user_logs_in(username: str, password: str):
loginScreen = StatusLoginScreen()
loginScreen.login(username, password)
def login_process_steps(context, user, password, data_dir_path):
def login_process_steps(context, user: str, password: str, data_dir_path: str):
a_user_starts_the_application_with_a_specific_data_folder(context, data_dir_path)
the_user_logs_in(user, password)
the_user_lands_on_the_signed_in_app()
def the_user_opens_app_settings_screen():
main_screen = StatusMainScreen()
main_screen.open_settings()
main_screen.open_settings()
def the_user_navigates_back_to_user_profile_page():
welcome_screen = StatusWelcomeScreen()
welcome_screen.navigate_back_to_user_profile_page()

View File

@ -13,10 +13,10 @@
# * The decorators Given/When/Then/Step can be used to associate a script snippet
# * with a pattern which is matched against the steps being executed.
# *****************************************************************************
from common.Common import *
import common.Common as common
import time
from steps.startupSteps import *
import steps.startupSteps as init_steps
from screens.StatusMainScreen import StatusMainScreen
from screens.StatusChatScreen import StatusChatScreen
@ -29,7 +29,7 @@ _statusChat = StatusChatScreen()
@Given("the user starts the application with a specific data folder \"|any|\"")
def step(context, data_folder_path):
a_user_starts_the_application_with_a_specific_data_folder(context, data_folder_path)
common.a_user_starts_the_application_with_a_specific_data_folder(context, data_folder_path)
@Given("the user restarts the app")
def step(context):
@ -41,7 +41,19 @@ def step(context, room):
@Given("the user clicks on escape key")
def step(context):
_statusMain.click_escape()
_statusMain.click_escape()
@Given("the user clears input \"|any|\"")
def step(context, input_component):
common.clear_input_text(input_component)
@Given("the user inputs the following \"|any|\" with ui-component \"|any|\"")
def step(context, text, obj):
the_user_inputs_the_following_text_with_uicomponent(text, obj)
@Given("the user clicks on the following ui-component \"|any|\"")
def step(context: any, obj: str):
the_user_clicks_on_the_following_ui_component(obj)
#########################
### ACTIONS region:
@ -51,11 +63,11 @@ def step(context):
def step(context):
the_user_restarts_the_app(context)
@When("user inputs the following |any| with ui-component |any|")
@When("the user inputs the following \"|any|\" with ui-component \"|any|\"")
def step(context, text, obj):
input_text(text, obj)
the_user_inputs_the_following_text_with_uicomponent(text, obj)
@When("user clicks on the following ui-component |any|")
@When("the user clicks on the following ui-component \"|any|\"")
def step(context: any, obj: str):
the_user_clicks_on_the_following_ui_component(obj)
@ -67,9 +79,9 @@ def step(context, room):
### VERIFICATIONS region:
#########################
@Then("the following ui-component |any| is not enabled")
@Then("the following ui-component \"|any|\" is not enabled")
def step(context, obj):
object_not_enabled(obj)
common.object_not_enabled(obj)
###########################################################################
### COMMON methods used in different steps given/when/then region:
@ -81,4 +93,10 @@ def the_user_restarts_the_app(context: any):
startApplication(context.userData["aut_name"])
def the_user_joins_chat_room(room: str):
the_user_joins_chat_room(room)
init_steps.the_user_joins_chat_room(room)
def the_user_inputs_the_following_text_with_uicomponent(text: str, obj):
common.input_text(text, obj)
def the_user_clicks_on_the_following_ui_component(obj):
init_steps.the_user_clicks_on_the_following_ui_component(obj)

View File

@ -23,6 +23,8 @@ 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()
###########################################################################

View File

@ -1,4 +1,4 @@
from steps.startupSteps import *
import steps.startupSteps as init_steps
from screens.StatusWelcomeScreen import StatusWelcomeScreen
from screens.StatusMainScreen import StatusMainScreen
@ -11,42 +11,66 @@ _mainScreen = StatusMainScreen()
@Given("A first time user lands on the status desktop and generates new key")
def step(context):
a_first_time_user_lands_on_and_generates_new_key(context)
init_steps.a_first_time_user_lands_on_and_generates_new_key(context)
@Given("A first time user lands on the status desktop and navigates to import seed phrase")
def step(context):
a_first_time_user_lands_on_and_navigates_to_import_seed_phrase(context)
init_steps.a_first_time_user_lands_on_and_navigates_to_import_seed_phrase(context)
@Given("the user lands on the signed in app")
def step(context):
the_user_lands_on_the_signed_in_app()
init_steps.the_user_lands_on_the_signed_in_app()
@Given("the user signs up with username \"|any|\" and password \"|any|\"")
def step(context, username, password):
the_user_signs_up(username, password)
init_steps.the_user_signs_up(username, password)
@Given("the user signs up with profileImage \"|any|\", username \"|any|\" and password \"|any|\"")
def step(context, profileImageUrl: str, username: str, password: str):
_welcomeScreen.input_username_profileImage_password_and_finalize_sign_up("file:///"+context.userData["fixtures_root"]+"images/"+profileImageUrl, username, password)
@Given("my profile modal has the updated profile image")
def step(context):
_welcomeScreen.profile_modal_image_is_updated()
@Given("the profile setting has the updated profile image")
def step(context):
_welcomeScreen.profile_settings_image_is_updated()
@Given("a screenshot of the profileImage is taken")
def step(context):
_welcomeScreen.grab_screenshot()
@Given("the user inputs username \"|any|\"")
def step(context, username):
the_user_inputs_username(username)
#########################
### ACTIONS region:
########################
@When("the user inputs username |any|")
@When("the user signs up with username \"|any|\" and password \"|any|\"")
def step(context, username, password):
init_steps.the_user_signs_up(username, password)
@When("the user inputs username \"|any|\"")
def step(context, username):
_welcomeScreen.input_username(username)
the_user_inputs_username(username)
@When("The user inputs the seed phrase \"|any|\"")
@When("the user inputs the seed phrase \"|any|\"")
def step(context, seed_phrase):
the_user_inputs_the_seed_phrase(seed_phrase)
init_steps.the_user_inputs_the_seed_phrase(seed_phrase)
@When("the user logs in with password |any|")
@When("the user logs in with password \"|any|\"")
def step(context, password: str):
_welcomeScreen.enter_password(password)
@When("the user signs up with profileImage |any|, username |any| and password |any|")
def step(context, profileImageUrl, username, password):
_welcomeScreen.input_username_profileImage_password_and_finalize_sign_up("file:///"+context.userData["fixtures_root"]+"images/"+profileImageUrl, username, password)
@When("a screenshot of the profileImage is taken")
def step(context):
_welcomeScreen.grab_screenshot()
@When("the user inputs the new password \"|any|\"")
def step(context, password: str):
_welcomeScreen.type_new_password(password)
@When("the user inputs the new confirmation password \"|any|\"")
def step(context, password: str):
_welcomeScreen.type_confirm_password(password)
#########################
### VERIFICATIONS region:
@ -54,7 +78,7 @@ def step(context):
@Then("the user lands on the signed in app")
def step(context):
the_user_lands_on_the_signed_in_app()
init_steps.the_user_lands_on_the_signed_in_app()
@Then("the invalid seed text is visible")
def step(context):
@ -64,14 +88,6 @@ def step(context):
def step(context):
_mainScreen.user_is_online()
@Then("my profile modal has the updated profile image")
def step(context):
_welcomeScreen.profile_modal_image_is_updated()
@Then("the profile setting has the updated profile image")
def step(context):
_welcomeScreen.profile_settings_image_is_updated()
@Then("the profile navigation bar has the updated profile image")
def step(context):
_welcomeScreen.profile_image_is_updated()
@ -81,4 +97,5 @@ def step(context):
###########################################################################
### COMMON methods used in different steps given/when/then region:
###########################################################################
def the_user_inputs_username(username: str):
_welcomeScreen.input_username(username)

View File

@ -2,6 +2,6 @@ from screens.StatusWelcomeScreen import StatusWelcomeScreen
_welcomeScreen = StatusWelcomeScreen()
@Then("the password strength indicator is |any|")
@Then("the password strength indicator is \"|any|\"")
def step(context, strength):
_welcomeScreen.validate_password_strength(strength)

View File

@ -2,6 +2,6 @@ AUT=nim_status_client
ENVVARS=envvars
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_statusSignUp tst_passwordStrength tst_statusLoginPassword
TEST_CASES=tst_statusSignUp tst_passwordStrength tst_statusLoginPassword tst_signUpNegativeCases tst_signUpSeedPhraseNegativeCases
VERSION=3
WRAPPERS=Qt

View File

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# This file contains hook functions to run as the .feature file is executed
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
import steps.startupSteps as init_steps
# Global properties for the specific feature
_user = "tester123"
_onboarding_new_psw_input = "onboarding_newPsw_Input"
@OnFeatureStart
def hook(context):
init_steps.context_init(context)
init_steps.a_first_time_user_lands_on_and_generates_new_key(context)
init_steps.the_user_inputs_username(_user)
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]

View File

@ -10,21 +10,22 @@
# *****************************************************************************/
Feature: Password strength validation including UI pixel-perfect validation
@merge
Scenario Outline: As a user I want to see the strength of the password
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
** and the user inputs username "tester123"
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <password> with ui-component onboarding_newPsw_Input
Then the password strength indicator is <strength>
Scenario Outline: As a user I want to see the strength of the password
Given the user clears input "onboarding_newPsw_Input"
When the user inputs the following "<password>" with ui-component "onboarding_newPsw_Input"
Then the password strength indicator is "<strength>"
Examples:
| username | password | strength |
| tester123 | abc | lower_very_weak |
| tester124 | ABC | upper_very_weak |
| tester124 | 123 | numbers_very_weak |
| tester124 | +_! | symbols_very_weak |
| tester124 | +1_3!48 | numbers_symbols_weak |
| tester124 | +1_3!48a | numbers_symbols_lower_so-so |
| tester124 | +1_3!48aT | numbers_symbols_lower_upper_good |
| tester124 | +1_3!48aTq | numbers_symbols_lower_upper_great |
| password | strength |
| abc | lower_very_weak |
| ABC | upper_very_weak |
| 123 | numbers_very_weak |
| +_! | symbols_very_weak |
| +1_3!48 | numbers_symbols_weak |
| +1_3!48a | numbers_symbols_lower_so-so |
| +1_3!48aT | numbers_symbols_lower_upper_good |
| +1_3!48aTq | numbers_symbols_lower_upper_great |

View File

@ -1,6 +1,6 @@
source(findFile('scripts', 'python/bdd.py'))
setupHooks('../../global_shared/scripts/bdd_hooks.py')
setupHooks('bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/')
def main():

View File

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# This file contains hook functions to run as the .feature file is executed
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
import steps.startupSteps as init_steps
# Global properties for the specific feature
_user = "tester123"
_onboarding_new_psw_input = "onboarding_newPsw_Input"
@OnFeatureStart
def hook(context):
init_steps.context_init(context)
init_steps.a_first_time_user_lands_on_and_generates_new_key(context)
@OnFeatureEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]
@OnScenarioEnd
def hook(context):
# Scenario cleanup
init_steps.the_user_navigates_back_to_user_profile_page()

View File

@ -0,0 +1,86 @@
Feature: Status Desktop Sign Up, negative cases
As a user I do not want to Sign-up with incorrect data into the Status Desktop application.
The following scenarios cover negative Sign up process scenarios when trying to do it with wrong data.
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
[Cleanup]
** the user navigates to first onboarding page
Scenario Outline: The user cannot sign up with wrong username format
Given the user clears input "onboarding_DiplayName_Input"
When the user inputs the following "<username>" with ui-component "onboarding_DiplayName_Input"
Then the following ui-component "onboarding_DetailsView_NextButton" is not enabled
Examples:
| username |
| Athl |
| Gra |
| tester3@ |
Scenario Outline: The user cannot sign up with wrong password format in both new password and confirmation input
Given the user inputs username "<username>"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_newPsw_Input"
And the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPsw_Input"
Then the following ui-component "onboarding_create_password_button" is not enabled
Examples:
| username | wrongpassword |
| tester124 | badP |
Scenario Outline: The user cannot sign up with right password format in new password input but incorrect in confirmation password input
Given the user inputs username "<username>"
And the user inputs the following "<password>" with ui-component "onboarding_newPsw_Input"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPsw_Input"
Then the following ui-component "onboarding_create_password_button" is not enabled
Examples:
| username | wrongpassword | password |
| tester124 | bad2!s | TesTEr16843/!@01 |
Scenario Outline: The user cannot sign up with incorrect confirmation-again password
Given the user inputs username "<username>"
And the user inputs the following "<password>" with ui-component "onboarding_newPsw_Input"
And the user inputs the following "<password>" with ui-component "onboarding_confirmPsw_Input"
And the user clicks on the following ui-component "onboarding_create_password_button"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPswAgain_Input"
Then the following ui-component "onboarding_finalise_password_button" is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | TesTEr16843/!@) | TesTEr16843/!@01 |
Scenario Outline: The user cannot finish Sign Up and Sign In process with wrong password format in both new password and confirmation input
Given the user inputs username "<username>"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_newPsw_Input"
And the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPsw_Input"
Then the following ui-component "onboarding_create_password_button" is not enabled
Examples:
| username | wrongpassword |
| tester123 | Invalid34 |
Scenario Outline: The user cannot finish Sign Up and Sign In process with right password format in new password input but incorrect in confirmation password input
Given the user inputs username "<username>"
And the user inputs the following "<password>" with ui-component "onboarding_newPsw_Input"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPsw_Input"
Then the following ui-component "onboarding_create_password_button" is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |
Scenario Outline: The user cannot finish Sign Up and Sign In process with incorrect confirmation-again password
Given the user inputs username "<username>"
And the user inputs the following "<password>" with ui-component "onboarding_newPsw_Input"
And the user inputs the following "<password>" with ui-component "onboarding_confirmPsw_Input"
And the user clicks on the following ui-component "onboarding_create_password_button"
When the user inputs the following "<wrongpassword>" with ui-component "onboarding_confirmPswAgain_Input"
Then the following ui-component "onboarding_finalise_password_button" is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |

View File

@ -0,0 +1,8 @@
source(findFile('scripts', 'python/bdd.py'))
setupHooks('bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/', '../../suite_onboarding/shared/steps/')
def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')

View File

@ -0,0 +1,15 @@
Feature: Status Desktop Sign Up with seed phrase, negative cases
As a user I do not want to Sign-up with incorrect seed phrase into the Status Desktop application.
The following scenarios cover negative Sign up process scenarios when trying to do it by seed phrase.
The feature start sequence follows the global one (setup on global `bdd_hooks`): No additional steps
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
When the user inputs the seed phrase "truth gold urban vital rose market legal release border gospel leave potato"
And the user clicks on the following ui-component "seedPhraseView_Submit_Button"
Then the following ui-component "seedPhraseView_Submit_Button" is not enabled
And the invalid seed text is visible

View File

@ -0,0 +1,8 @@
source(findFile('scripts', 'python/bdd.py'))
setupHooks('../../global_shared/scripts/bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/', '../../suite_onboarding/shared/steps/')
def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')

View File

@ -15,6 +15,8 @@ Feature: Status Desktop login
The following scenarios cover login by using a password.
The feature start sequence follows the global one (setup on global `bdd_hooks`): No additional steps
Scenario Outline: User tries to login with a valid 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>"
@ -27,8 +29,6 @@ Feature: Status Desktop login
| username | password |
| Athletic_Prime | TesTEr16843/!@00 |
@merge
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>"
@ -36,8 +36,7 @@ Feature: Status Desktop login
When the user restarts the app
And the user "<username>" logs in with password "<wrongpassword>"
Then the user is NOT able to login to Status Desktop application
Examples:
| username | password | wrongpassword |
| Athletic_Prime | TesTEr16843/!@00 | Invalid34 |
| Granular_Diligent | TesTEr16843/!@11 | Testpwd |
| Nervous_Pesky | TesTEr16843/!@22 | WrongPSW |
Examples:
| username | password | wrongpassword |
| Nervous_Pesky | TesTEr16843/!@22 | WrongPSW |

View File

@ -12,147 +12,40 @@
Feature: Status Desktop Sign Up
As a user I want to Sign-up into the Status Desktop application.
The following scenarios cover Sign up process.
Scenario: User signs up and signs in with password
The following scenarios cover positive Sign up process scenarios.
The feature start sequence follows the global one (setup on global `bdd_hooks`): No additional steps
Scenario: The user signs up with password and its state is online
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
@merge
Scenario Outline: User cannot sign up with wrong username format
Given A first time user lands on the status desktop and generates new key
When user inputs the following <username> with ui-component onboarding_DiplayName_Input
Then the following ui-component onboarding_DetailsView_NextButton is not enabled
Examples:
| username |
| Athl |
| Gra |
| tester3@ |
@merge
Scenario Outline: User cannot sign up with wrong password format in both new password and confirmation input
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <wrongpassword> with ui-component onboarding_newPsw_Input
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPsw_Input
Then the following ui-component onboarding_create_password_button is not enabled
Examples:
| username | wrongpassword |
| tester123 | Invalid34 |
| tester124 | badP |
| tester124 | bad2!s |
@merge
Scenario Outline: User cannot sign up with right password format in new password input but incorrect in confirmation password input
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <password> with ui-component onboarding_newPsw_Input
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPsw_Input
Then the following ui-component onboarding_create_password_button is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |
| tester124 | badP | TesTEr16843/!@01 |
| tester124 | bad2!s | TesTEr16843/!@01 |
@merge
Scenario Outline: User cannot sign up with incorrect confirmation-again password
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <password> with ui-component onboarding_newPsw_Input
And user inputs the following <password> with ui-component onboarding_confirmPsw_Input
And user clicks on the following ui-component onboarding_create_password_button
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPswAgain_Input
Then the following ui-component onboarding_finalise_password_button is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |
| tester123 | TesTEr16843/!@) | TesTEr16843/!@01 |
@merge
Scenario Outline: User cannot finish Sign Up and Sign In process with wrong password format in both new password and confirmation input
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <wrongpassword> with ui-component onboarding_newPsw_Input
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPsw_Input
Then the following ui-component onboarding_create_password_button is not enabled
Examples:
| username | wrongpassword |
| tester123 | Invalid34 |
@merge
Scenario Outline: User cannot finish Sign Up and Sign In process with right password format in new password input but incorrect in confirmation password input
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <password> with ui-component onboarding_newPsw_Input
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPsw_Input
Then the following ui-component onboarding_create_password_button is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |
| tester123 | TesTEr16843/!@) | TesTEr16843/!@01 |
@merge
Scenario Outline: User cannot finish Sign Up and Sign In process with incorrect confirmation-again password
Given A first time user lands on the status desktop and generates new key
When the user inputs username <username>
When user inputs the following <password> with ui-component onboarding_newPsw_Input
And user inputs the following <password> with ui-component onboarding_confirmPsw_Input
And user clicks on the following ui-component onboarding_create_password_button
And user inputs the following <wrongpassword> with ui-component onboarding_confirmPswAgain_Input
Then the following ui-component onboarding_finalise_password_button is not enabled
Examples:
| username | wrongpassword | password |
| tester123 | Invalid34 | TesTEr16843/!@00 |
| tester123 | TesTEr16843/!@) | TesTEr16843/!@01 |
Scenario Outline: User signs up with imported seed phrase
When the user signs up with username "tester123" and password "TesTEr16843/!@00"
Then the user lands on the signed in app
And the user is online
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>"
And user clicks on the following ui-component seedPhraseView_Submit_Button
When the user inputs the seed phrase "<seed>"
And the user clicks on the following ui-component "seedPhraseView_Submit_Button"
Given the user signs up with username "tester123" and password "TesTEr16843/!@00"
And the user lands on the signed in app
Then the user lands on the signed in app
And the user is online
Examples:
| seed | address |
| truth gold urban vital rose market legal release border gospel leave fame | 0x8672E2f1a7b28cda8bcaBb53B52c686ccB7735c3 |
| lemon card easy goose keen divide cabbage daughter glide glad sense dice promote present august obey stay cheese | 0xdd06a08d469dd61Cb2E5ECE30f5D16019eBe0fc9 |
| 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 |
@merge
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
When The user inputs the seed phrase "truth gold urban vital rose market legal release border gospel leave potato"
And user clicks on the following ui-component seedPhraseView_Submit_Button
Then the following ui-component seedPhraseView_Submit_Button is not enabled
And the invalid seed text is visible
@merge
Scenario: After Signing up the Profile state should be online
@mayfail
# TODO: Check validation. It may be broken due to the new user profile design.
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 username "tester123" and password "TesTEr16843/!@00"
Then the user is online
@merge
Scenario: User signs up with a profile image
Given A first time user lands on the status desktop and generates new key
When the user signs up with profileImage doggo.jpeg, username tester123 and password TesTEr16843/!@00
Then my profile modal has the updated profile image
And the user signs up with profileImage "doggo.jpeg", username "tester123" and password "TesTEr16843/!@00"
And my profile modal has the updated profile image
And the profile setting has the updated profile image
When the user restarts the app
And the user restarts the app
And a screenshot of the profileImage is taken
And the user logs in with password TesTEr16843/!@00
When the user logs in with password "TesTEr16843/!@00"
Then the profile navigation bar has the updated profile image

View File

@ -18,6 +18,7 @@ Page {
StatusRoundButton {
id: backButton
objectName: "onboardingBackButton"
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
anchors.bottom: parent.bottom