test(tst_userIdentity): Fix test scenarios broken due to new user profile design

- Fixed test scenarios broken due to new user profile design.
- Added new verifications in social links: github, youtube, discord and telegram.
- Scenario statements reorganization.

Fixes #8281
This commit is contained in:
Noelia 2022-12-16 19:24:51 +01:00 committed by Noelia
parent 821b7f2571
commit ec8c64d7a1
16 changed files with 222 additions and 130 deletions

View File

@ -20,15 +20,15 @@ def verify_screen(objName: str, timeout: int=_MAX_WAIT_OBJ_TIMEOUT):
def verify_object_enabled(objName: str, timeout: int=_MIN_WAIT_OBJ_TIMEOUT, condition: bool=True):
result = is_loaded_visible_and_enabled(objName, timeout)
test.verify(result[0] == condition, "object not enabled")
test.verify(result[0] == condition, "Checking if object enabled")
def verify_text_matching(objName: str, text: str):
test.verify(is_text_matching(objName, text), "text does not match")
test.verify(is_text_matching(objName, text), "Checking if text matches")
def verify_text_matching_insensitive(obj, text: str):
test.verify(is_text_matching_insensitive(obj, text), "text does not match")
test.verify(is_text_matching_insensitive(obj, text), "Checking if test matches insensitive")
def verify_equal(result: object, expected: object, msg: str = "objects are not equal"):
def verify_equal(result: object, expected: object, msg: str = "Checking if objects are equal"):
test.verify(result == expected, msg)
def verify(result: bool, msg: str):

View File

@ -80,12 +80,16 @@ class WalletSettingsScreen(Enum):
class ProfileSettingsScreen(Enum):
DISPLAY_NAME: str = "displayName_TextEdit"
BIO: str = "bio_TextEdit"
TWITTER_SOCIAL_LINK: str = "twitter_StaticSocialLinkInput"
PERSONAL_SITE_SOCIAL_LINK: str = "personalSite_StaticSocialLinkInput"
TWITTER_SOCIAL_LINK: str = "twitter_TextEdit"
PERSONAL_SITE_SOCIAL_LINK: str = "personalSite_TextEdit"
OPEN_SOCIAL_LINKS_DIALOG: str = "addMoreSocialLinks_StatusIconTextButton"
CLOSE_SOCIAL_LINKS_DIALOG: str = "modal_Close_Button"
CLOSE_SOCIAL_LINKS_DIALOG: str = "closeButton_StatusHeaderAction"
TWITTER_SOCIAL_LINK_IN_DIALOG: str = "twitter_popup_TextEdit"
PERSONAL_SITE_LINK_IN_DIALOG: str = "personalSite_popup_TextEdit"
GITHUB_SOCIAL_LINK_IN_DIALOG: str = "github_popup_TextEdit"
YOUTUBE_SOCIAL_LINK_IN_DIALOG: str = "youtube_popup_TextEdit"
DISCORD_SOCIAL_LINK_IN_DIALOG: str = "discord_popup_TextEdit"
TELEGRAM_SOCIAL_LINK_IN_DIALOG: str = "telegram_popup_TextEdit"
CUSTOM_LINK_IN_DIALOG: str = "customLink_popup_TextEdit"
CUSTOM_URL_IN_DIALOG: str = "customUrl_popup_TextEdit"
CHANGE_PASSWORD_BUTTON: str = "change_password_button"
@ -279,32 +283,83 @@ class SettingsScreen:
click_obj_by_name(SettingsScreenComponents.SAVE_BUTTON.value)
self.verify_bio(bio)
def set_social_links(self, twitter, personal_site, custom_link_name, custom_link: str):
def set_social_links(self, table):
twitter = ""
personal_site = ""
github = ""
youtube = ""
discord = ""
telegram = ""
custom_link_text = ""
custom_link = ""
if table is not None:
verify_equals(8, len(table)) # Expecting 8 as social media link fields to verify
twitter = table[0][0]
personal_site = table[1][0]
github = table[2][0]
youtube = table[3][0]
discord = table[4][0]
telegram = table[5][0]
custom_link_text = table[6][0]
custom_link = table[7][0]
click_obj_by_name(ProfileSettingsScreen.OPEN_SOCIAL_LINKS_DIALOG.value)
click_obj_by_name(ProfileSettingsScreen.TWITTER_SOCIAL_LINK_IN_DIALOG.value)
verify(type(ProfileSettingsScreen.TWITTER_SOCIAL_LINK_IN_DIALOG.value, twitter), "set twitter")
verify(setText(ProfileSettingsScreen.TWITTER_SOCIAL_LINK_IN_DIALOG.value, twitter), "set twitter")
click_obj_by_name(ProfileSettingsScreen.PERSONAL_SITE_LINK_IN_DIALOG.value)
verify(type(ProfileSettingsScreen.PERSONAL_SITE_LINK_IN_DIALOG.value, personal_site), "set personal site")
verify(setText(ProfileSettingsScreen.PERSONAL_SITE_LINK_IN_DIALOG.value, personal_site), "set personal site")
click_obj_by_name(ProfileSettingsScreen.GITHUB_SOCIAL_LINK_IN_DIALOG.value)
verify(setText(ProfileSettingsScreen.GITHUB_SOCIAL_LINK_IN_DIALOG.value, github), "set github")
click_obj_by_name(ProfileSettingsScreen.YOUTUBE_SOCIAL_LINK_IN_DIALOG.value)
verify(setText(ProfileSettingsScreen.YOUTUBE_SOCIAL_LINK_IN_DIALOG.value, youtube), "set youtube")
click_obj_by_name(ProfileSettingsScreen.DISCORD_SOCIAL_LINK_IN_DIALOG.value)
verify(setText(ProfileSettingsScreen.DISCORD_SOCIAL_LINK_IN_DIALOG.value, discord), "set discord")
click_obj_by_name(ProfileSettingsScreen.TELEGRAM_SOCIAL_LINK_IN_DIALOG.value)
verify(setText(ProfileSettingsScreen.TELEGRAM_SOCIAL_LINK_IN_DIALOG.value, telegram), "set telegram")
click_obj_by_name(ProfileSettingsScreen.CUSTOM_LINK_IN_DIALOG.value)
verify(type(ProfileSettingsScreen.CUSTOM_LINK_IN_DIALOG.value, custom_link_name), "set custom link name")
verify(setText(ProfileSettingsScreen.CUSTOM_LINK_IN_DIALOG.value, custom_link_text), "set custom link name")
click_obj_by_name(ProfileSettingsScreen.CUSTOM_URL_IN_DIALOG.value)
verify(type(ProfileSettingsScreen.CUSTOM_URL_IN_DIALOG.value, custom_link), "set custom link url")
verify(setText(ProfileSettingsScreen.CUSTOM_URL_IN_DIALOG.value, custom_link), "set custom link url")
click_obj_by_name(ProfileSettingsScreen.CLOSE_SOCIAL_LINKS_DIALOG.value)
click_obj_by_name(SettingsScreenComponents.SAVE_BUTTON.value)
def verify_social_links(self, twitter, personal_site, custom_link_name, custom_link: str):
def verify_social_links(self, table):
twitter = ""
personal_site = ""
github = ""
youtube = ""
discord = ""
telegram = ""
custom_link_text = ""
custom_link = ""
if table is not None:
verify_equals(8, len(table)) # Expecting 8 as social media link fields to verify
twitter = table[0][0]
personal_site = table[1][0]
github = table[2][0]
youtube = table[3][0]
discord = table[4][0]
telegram = table[5][0]
custom_link_text = table[6][0]
custom_link = table[7][0]
verify_text_matching(ProfileSettingsScreen.TWITTER_SOCIAL_LINK.value, twitter)
verify_text_matching(ProfileSettingsScreen.PERSONAL_SITE_SOCIAL_LINK.value, personal_site)
click_obj_by_name(ProfileSettingsScreen.OPEN_SOCIAL_LINKS_DIALOG.value)
verify_text_matching(ProfileSettingsScreen.TWITTER_SOCIAL_LINK_IN_DIALOG.value, twitter)
verify_text_matching(ProfileSettingsScreen.PERSONAL_SITE_LINK_IN_DIALOG.value, personal_site)
verify_text_matching(ProfileSettingsScreen.CUSTOM_LINK_IN_DIALOG.value, custom_link_name)
verify_text_matching(ProfileSettingsScreen.GITHUB_SOCIAL_LINK_IN_DIALOG.value, github)
verify_text_matching(ProfileSettingsScreen.YOUTUBE_SOCIAL_LINK_IN_DIALOG.value, youtube)
verify_text_matching(ProfileSettingsScreen.DISCORD_SOCIAL_LINK_IN_DIALOG.value, discord)
verify_text_matching(ProfileSettingsScreen.TELEGRAM_SOCIAL_LINK_IN_DIALOG.value, telegram)
verify_text_matching(ProfileSettingsScreen.CUSTOM_LINK_IN_DIALOG.value, custom_link_text)
verify_text_matching(ProfileSettingsScreen.CUSTOM_URL_IN_DIALOG.value, custom_link)
click_obj_by_name(ProfileSettingsScreen.CLOSE_SOCIAL_LINKS_DIALOG.value)

View File

@ -46,12 +46,8 @@ class MainScreenComponents(Enum):
class ProfilePopup(Enum):
USER_IMAGE = "ProfileHeader_userImage"
DISPLAY_NAME = "ProfileHeader_displayName"
DISPLAY_NAME_EDIT_ICON = "ProfileHeader_displayNameEditIcon"
class DisplayNamePopup(Enum):
DISPLAY_NAME_INPUT = "DisplayNamePopup_displayNameInput"
DISPLAY_NAME_OK_BUTTON = "DisplayNamePopup_okButton"
DISPLAY_NAME = "ProfilePopup_displayName"
EDIT_PROFILE_BUTTON = "ProfilePopup_editButton"
class ChatNamePopUp(Enum):
CHAT_NAME_TEXT = "chat_name_PlaceholderText"
@ -196,12 +192,6 @@ class StatusMainScreen:
def verify_profile_popup_display_name(self, display_name: str):
verify_text_matching(ProfilePopup.DISPLAY_NAME.value, display_name)
def set_profile_popup_display_name(self, display_name: str):
click_obj_by_name(ProfilePopup.DISPLAY_NAME_EDIT_ICON.value)
name_changed = setText(DisplayNamePopup.DISPLAY_NAME_INPUT.value, display_name)
verify(name_changed, "set display name")
click_obj_by_name(DisplayNamePopup.DISPLAY_NAME_OK_BUTTON.value)
def click_escape(self):
press_escape(MainScreenComponents.MAIN_WINDOW.value)
@ -236,3 +226,6 @@ class StatusMainScreen:
click_obj_by_name(MainScreenComponents.SETTINGS_BUTTON.value)
myProfileSettingsObject = wait_and_get_obj(MainScreenComponents.PROFILE_SETTINGS_VIEW.value)
image_present("profiletestimage", True, 95, 100, 183, True, myProfileSettingsObject)
def navigate_to_edit_profile(self):
click_obj_by_name(ProfilePopup.EDIT_PROFILE_BUTTON.value)

View File

@ -9,6 +9,7 @@ from steps.commonInitSteps import context_init
@OnScenarioStart
def hook(context):
context_init(context, testSettings)
context.userData["scenario_name"] = context._data["title"]
@OnScenarioEnd
def hook(context):

View File

@ -9,7 +9,7 @@ def verify_screenshot(func, obj: Dict[str, Any] = mainWindow_RighPanel):
context = args[0]
func(*args, **kwargs)
scenario = context.userData["scenario_name"].lower().replace(" ", "_")
scenario = context.userData["feature_name"].lower().replace(" ", "_")
step = context.userData["step_name"].lower().replace(" ", "_")
filename = f"{step}_{'_'.join(args[1:])}"
path = os.path.join(scenario, filename)

View File

@ -31,6 +31,7 @@ userContextMenu_ViewMyProfileAction = {"container": statusDesktop_mainWindow_ove
# popups
modal_Close_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "modalCloseButtonRectangle", "type": "Rectangle", "visible": True}
delete_Channel_ConfirmationDialog_DeleteButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "deleteChatConfirmationDialogDeleteButton", "type": "StatusButton"}
closeButton_StatusHeaderAction = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerActionsCloseButton", "type": "StatusFlatRoundButton", "visible": True}
# Main Window - chat related:
mainWindow_statusChatNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusChatNavBarListView", "type": "ListView", "visible": True}
@ -48,8 +49,5 @@ startChat_Btn = {"container": statusDesktop_mainWindow_overlay, "objectName": "s
# My Profile Popup
ProfileHeader_userImage = {"container": statusDesktop_mainWindow_overlay, "objectName": "ProfileHeader_userImage", "type": "UserImage", "visible": True}
ProfileHeader_displayName = {"container": statusDesktop_mainWindow_overlay, "objectName": "ProfileHeader_displayName", "type": "StyledText", "visible": True}
ProfileHeader_displayNameEditIcon = {"container": statusDesktop_mainWindow_overlay, "objectName": "ProfileHeader_displayNameEditIcon", "type": "SVGImage", "visible": True}
DisplayNamePopup_displayNameInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "DisplayNamePopup_displayNameInput", "type": "TextEdit", "visible": True}
DisplayNamePopup_okButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "DisplayNamePopup_okButton", "type": "StatusButton", "visible": True}
ProfilePopup_displayName = {"container": statusDesktop_mainWindow_overlay, "objectName": "ProfileDialog_displayName", "type": "StatusBaseText", "visible": True}
ProfilePopup_editButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "editProfileButton", "type": "StatusButton", "visible": True}

View File

@ -52,17 +52,27 @@ messaging_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objec
# Profile Settings:
displayName_StatusInput = {"container": mainWindow_ScrollView_2, "objectName": "displayNameInput", "type": "StatusInput", "visible": True}
displayName_StatusInput = {"container": statusDesktop_mainWindow, "objectName": "displayNameInput", "type": "StatusInput", "visible": True}
displayName_TextEdit = {"container": displayName_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
bio_StatusInput = {"container": mainWindow_ScrollView_2, "objectName": "bioInput", "type": "StatusInput", "visible": True}
bio_StatusInput = {"container": statusDesktop_mainWindow, "objectName": "bioInput", "type": "StatusInput", "visible": True}
bio_TextEdit = {"container": bio_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
twitter_StaticSocialLinkInput = {"container": mainWindow_ScrollView_2, "objectName": "__twitter-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
personalSite_StaticSocialLinkInput = {"container": mainWindow_ScrollView_2, "objectName": "__personal_site-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
addMoreSocialLinks_StatusIconTextButton = {"container": mainWindow_ScrollView_2, "objectName": "addMoreSocialLinksButton", "type": "StatusIconTextButton", "visible": True}
twitter_StaticSocialLinkInput = {"container": statusDesktop_mainWindow, "objectName": "__twitter-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
twitter_TextEdit = {"container": twitter_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
personalSite_StaticSocialLinkInput = {"container": statusDesktop_mainWindow, "objectName": "__personal_site-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
personalSite_TextEdit = {"container": personalSite_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
addMoreSocialLinks_StatusIconTextButton = {"container": statusDesktop_mainWindow, "objectName": "addMoreSocialLinksButton", "type": "StatusIconTextButton", "visible": True}
twitter_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__twitter-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
twitter_popup_TextEdit = {"container": twitter_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
personalSite_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__personal_site-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
personalSite_popup_TextEdit = {"container": personalSite_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
github_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__github-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
github_popup_TextEdit = {"container": github_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
youtube_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__youtube-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
youtube_popup_TextEdit = {"container": youtube_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
discord_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__discord-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
discord_popup_TextEdit = {"container": discord_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
telegram_popup_StaticSocialLinkInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "__telegram-socialLinkInput", "type": "StaticSocialLinkInput", "visible": True}
telegram_popup_TextEdit = {"container": telegram_popup_StaticSocialLinkInput, "type": "TextEdit", "unnamed": 1, "visible": True}
customLink_popup_StatusInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "hyperlinkInput", "type": "StatusInput", "visible": True}
customLink_popup_TextEdit = {"container": customLink_popup_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
customUrl_popup_StatusInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "urlInput", "type": "StatusInput", "visible": True}

View File

@ -26,7 +26,7 @@ _aut_name = "aut_name"
_status_data_folder = "status_data_folder_path"
_fixtures_root = "fixtures_root"
_search_images = "search_images"
_scenario_name = "scenario_name"
_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
@ -39,7 +39,7 @@ def context_init(context, testSettings, screenshot_on_fail = True):
context.userData[_fixtures_root] = os.path.join(os.path.dirname(__file__), _status_fixtures_folder_path)
context.userData[_search_images] = os.path.join(os.path.dirname(__file__), _status_shared_images_path)
context.userData[_scenario_name] = context._data["title"]
context.userData[_feature_name] = context._data["title"]
base_path = os.path.join(os.path.dirname(__file__))
split_path = base_path.split("/")

View File

@ -35,7 +35,29 @@ def step(context: any):
@Given("the user opens the wallet settings")
def step(context: any):
the_user_opens_the_wallet_settings()
@Given("the user opens the profile settings")
def step(context: any):
the_user_opens_the_profile_settings()
@Given("the user's display name is \"|any|\"")
def step(context, display_name: str):
if "popup" in context.userData["scenario_name"]:
the_user_display_name_in_profile_popup_is(display_name)
else:
the_user_display_name_is(display_name)
@Given("the user's bio is empty")
def step(context):
_settingsScreen.verify_bio("")
@Given("the user's social links are empty")
def step(context):
_settingsScreen.verify_social_links(None)
@Given("the user opens own profile popup")
def step(context: any):
the_user_opens_own_profile_popup()
#########################
### ACTIONS region:
@ -120,19 +142,19 @@ def step(context: any):
@When("the user opens the profile settings")
def step(context: any):
_settingsScreen.open_profile_settings()
the_user_opens_the_profile_settings()
@When("the user sets display name to \"|any|\"")
def step(context, display_name):
def step(context, display_name):
_settingsScreen.set_display_name(display_name)
@When("the user backs up the wallet seed phrase")
def step(context):
_settingsScreen.check_backup_seed_phrase_workflow()
@When("the user sets display links to twitter: \"|any|\", personal site: \"|any|\", \"|any|\": \"|any|\"")
def step(context, twitter, personal_site, custom_link_name, custom_link):
_settingsScreen.set_social_links(twitter, personal_site, custom_link_name, custom_link)
@When("the user sets social links to:")
def step(context):
_settingsScreen.set_social_links(context.table)
@When("the user sets bio to \"|any|\"")
def step(context, bio):
@ -149,14 +171,6 @@ def step(context: any):
@When("the users switches state to automatic")
def step(context: any):
_statusMain.set_user_state_to_automatic()
@When("the user opens own profile popup")
def step(context: any):
_statusMain.open_own_profile_popup()
@When("in profile popup the user sets display name to \"|any|\"")
def step(context, display_name):
_statusMain.set_profile_popup_display_name(display_name)
@When("the user changes the password from |any| to |any|")
def step(context: any, oldPassword: str, newPassword: str):
@ -165,6 +179,14 @@ def step(context: any, oldPassword: str, newPassword: str):
@When("the user sends a contact request to the chat key \"|any|\" with the reason \"|any|\"")
def step(context: any, chat_key: str, reason: str):
_settingsScreen.add_contact_by_chat_key(chat_key, reason)
@When("the user opens own profile popup")
def step(context: any):
the_user_opens_own_profile_popup()
@When("the user navigates to edit profile")
def step(context: any):
_statusMain.navigate_to_edit_profile()
#########################
### VERIFICATIONS region:
@ -186,25 +208,20 @@ def step(context, new_name: str, new_color: str):
def step(context: any):
_settingsScreen.verify_the_app_is_closed()
@Then("the user's display name should be \"|any|\"")
def step(context, display_name):
_settingsScreen.verify_display_name(display_name)
@Then("the user's display name is \"|any|\"")
def step(context, display_name: str):
if "popup" in context.userData["scenario_name"]:
the_user_display_name_in_profile_popup_is(display_name)
else:
the_user_display_name_is(display_name)
@Then("the user's bio should be empty")
def step(context):
_settingsScreen.verify_bio("")
@Then("the user's bio should be \"|any|\"")
@Then("the user's bio is \"|any|\"")
def step(context, bio):
_settingsScreen.verify_bio(bio)
@Then("the user's social links should be empty")
@Then("the user's social links are:")
def step(context):
_settingsScreen.verify_social_links("", "", "", "")
@Then("the user's social links should be: \"|any|\", personal site: \"|any|\", \"|any|\": \"|any|\"")
def step(context, twitter, personal_site, custom_link_name, custom_link):
_settingsScreen.verify_social_links(twitter, personal_site, custom_link_name, custom_link)
_settingsScreen.verify_social_links(context.table)
@Then("the application displays |any| as the selected language")
def step(context, native):
@ -228,10 +245,6 @@ def step(context: any):
def step(context: any):
_statusMain.user_is_set_to_automatic()
@Then("in profile popup the user's display name should be \"|any|\"")
def step(context, display_name):
_statusMain.verify_profile_popup_display_name(display_name)
@Then("the contact request for chat key \"|any|\" is present in the pending requests tab")
def step(context, chat_key: str):
_settingsScreen.verify_contact_request(chat_key)
@ -250,4 +263,16 @@ def the_user_activates_wallet():
wallet_init_steps.the_user_activates_wallet()
def the_user_opens_the_wallet_settings():
wallet_init_steps.the_user_opens_the_wallet_settings()
wallet_init_steps.the_user_opens_the_wallet_settings()
def the_user_opens_the_profile_settings():
_settingsScreen.open_profile_settings()
def the_user_display_name_is(display_name: str):
_settingsScreen.verify_display_name(display_name)
def the_user_display_name_in_profile_popup_is(display_name: str):
_statusMain.verify_profile_popup_display_name(display_name)
def the_user_opens_own_profile_popup():
_statusMain.open_own_profile_popup()

View File

@ -72,13 +72,17 @@ def step(context, password: str):
def step(context, password: str):
_welcomeScreen.type_confirm_password(password)
@When("the user lands on the signed in app")
def step(context):
the_user_lands_on_the_signed_in_app()
#########################
### VERIFICATIONS region:
#########################
@Then("the user lands on the signed in app")
def step(context):
init_steps.the_user_lands_on_the_signed_in_app()
the_user_lands_on_the_signed_in_app()
@Then("the invalid seed text is visible")
def step(context):
@ -99,3 +103,6 @@ def step(context):
###########################################################################
def the_user_inputs_username(username: str):
_welcomeScreen.input_username(username)
def the_user_lands_on_the_signed_in_app():
init_steps.the_user_lands_on_the_signed_in_app()

View File

@ -4,4 +4,4 @@ from objectmaphelper import *
from scripts.onboarding_names import *
from scripts.settings_names import *
from scripts.login_names import *
from scripts.login_names import *

View File

@ -1,25 +0,0 @@
# -*- 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.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
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]

View File

@ -2,36 +2,62 @@ Feature: User Identity
As a user I want to set my identity, that is: display name, bio and social links.
The feature start sequence follows the global one (setup on global `bdd_hooks`): No additional steps
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: Sign up and open settings section
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
# TODO: Scenario broken due to new user profile design. It will be addressed in task #8281
@mayfail
Scenario: User sets display name, bio and social links
When the user opens app settings screen
Scenario Outline: The user sets display name, bio and social links
Given the user opens app settings screen
And the user opens the profile settings
Then the user's display name should be "tester123"
And the user's bio should be empty
And the user's social links should be empty
When the user sets display name to "tester123_changed"
And the user sets bio to "Hello, I am super tester!"
And the user sets display links to twitter: "twitter_handle", personal site: "status.im", "customLink": "customUrl"
And the user's display name is "tester123"
And the user's bio is empty
And the user's social links are empty
When the user sets display name to "<user>"
And the user sets bio to "<bio>"
And the user sets social links to:
| testerTwitter |
| status.im |
| testerGithub |
| testerTube |
| testerDiscord |
| testerTelegram |
| customLink |
| https://status.im/ |
And the user restarts the app
And the user "tester123_changed" logs in with password "TesTEr16843/!@00"
Then the user lands on the signed in app
When the user opens app settings screen
And the user "<user>" logs in with password "TesTEr16843/!@00"
And the user lands on the signed in app
And the user opens app settings screen
And the user opens the profile settings
Then the user's display name should be "tester123_changed"
And the user's bio should be "Hello, I am super tester!"
And the user's social links should be: "twitter_handle", personal site: "status.im", "customLink": "customUrl"
# TODO: Scenario broken due to new user profile design. It will be addressed in task #8281
@mayfail
Scenario: The user can change own display name in profile popup
When the user opens own profile popup
Then in profile popup the user's display name should be "tester123"
When in profile popup the user sets display name to "tester123_changed"
Then in profile popup the user's display name should be "tester123_changed"
Then the user's display name is "<user>"
And the user's bio is "<bio>"
And the user's social links are:
| testerTwitter |
| status.im |
| testerGithub |
| testerTube |
| testerDiscord |
| testerTelegram |
| customLink |
| https://status.im/ |
Examples:
| user | bio |
| tester123_changed | Hello, I am super tester! |
Scenario Outline: The user can change own display name in profile popup
Given the user opens own profile popup
And the user's display name is "tester123"
When the user navigates to edit profile
And the user sets display name to "<user>"
And the user opens own profile popup
Then the user's display name is "<user>"
Examples:
| user |
| tester123_changed |

View File

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

View File

@ -55,6 +55,7 @@ Item {
StatusFlatRoundButton {
id: closeButton
objectName: "headerActionsCloseButton"
Layout.fillHeight: true
Layout.preferredHeight: d.buttonSize

View File

@ -116,6 +116,7 @@ Pane {
Component {
id: btnEditProfileComponent
StatusButton {
objectName: "editProfileButton"
size: StatusButton.Size.Small
text: qsTr("Edit Profile")
enabled: !root.readOnly