fix(@desktop/wallet): Added squish test for change password and relogin
fixes #6900
This commit is contained in:
parent
e657b311aa
commit
9638b200e1
|
@ -78,6 +78,14 @@ class ProfileSettingsScreen(Enum):
|
|||
PERSONAL_SITE_LINK_IN_DIALOG: str = "personalSite_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"
|
||||
|
||||
class ChangePasswordMenu(Enum):
|
||||
CHANGE_PASSWORD_CURRENT_PASSWORD_INPUT: str = "change_password_menu_current_password_text_field"
|
||||
CHANGE_PASSWORD_NEW_PASSWORD_INPUT: str = "change_password_menu_new_password_text_field"
|
||||
CHANGE_PASSWORD_NEW_PASSWORD_CONFIRM_INPUT: str = "change_password_menu_new_password_confirm_text_field"
|
||||
CHANGE_PASSWORD_SUBMIT_BUTTON: str = "change_password_menu_submit_button"
|
||||
CHANGE_PASSWORD_SUCCESS_MENU_SIGN_OUT_QUIT_BUTTON: str = "change_password_success_menu_sign_out_quit_button"
|
||||
|
||||
class ConfirmationDialog(Enum):
|
||||
SIGN_OUT_CONFIRMATION: str = "signOutConfirmation_StatusButton"
|
||||
|
@ -330,3 +338,17 @@ class SettingsScreen:
|
|||
|
||||
def verify_seed_phrase_indicator_not_visible(self):
|
||||
verify_not_found(WalletSettingsScreen.BACKUP_SEED_PHRASE_BUTTON.value, "Check that backup seed phrase settings button is visible")
|
||||
|
||||
def change_user_password(self, oldPassword: str, newPassword: str):
|
||||
get_and_click_obj(ProfileSettingsScreen.CHANGE_PASSWORD_BUTTON.value)
|
||||
|
||||
type(ChangePasswordMenu.CHANGE_PASSWORD_CURRENT_PASSWORD_INPUT.value, oldPassword)
|
||||
|
||||
type(ChangePasswordMenu.CHANGE_PASSWORD_NEW_PASSWORD_INPUT.value, newPassword)
|
||||
|
||||
type(ChangePasswordMenu.CHANGE_PASSWORD_NEW_PASSWORD_CONFIRM_INPUT.value, newPassword)
|
||||
|
||||
click_obj_by_name(ChangePasswordMenu.CHANGE_PASSWORD_SUBMIT_BUTTON.value)
|
||||
click_obj_by_name(ChangePasswordMenu.CHANGE_PASSWORD_SUCCESS_MENU_SIGN_OUT_QUIT_BUTTON.value)
|
||||
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ customLink_popup_StatusInput = {"container": statusDesktop_mainWindow_overlay, "
|
|||
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}
|
||||
customUrl_popup_TextEdit = {"container": customUrl_popup_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
|
||||
change_password_button = {"container": statusDesktop_mainWindow, "type": "StatusButton", "objectName": "profileSettingsChangePasswordButton", "visible": True}
|
||||
|
||||
# Wallet Settings:
|
||||
settings_Wallet_MainView_GeneratedAccounts = {"container": statusDesktop_mainWindow, "objectName":'generatedAccounts', "type": 'ListView'}
|
||||
|
@ -121,3 +122,16 @@ backup_seed_phrase_popup_BackupSeedStepBase_confirmSecondWord = {"container": st
|
|||
backup_seed_phrase_popup_BackupSeedStepBase_confirmSecondWord_inputText = {"container": backup_seed_phrase_popup_BackupSeedStepBase_confirmSecondWord, "objectName": "BackupSeedStepBase_inputText", "type": "TextEdit", "visible": True}
|
||||
backup_seed_phrase_popup_ConfirmStoringSeedPhrasePanel_storeCheck = {"container": statusDesktop_mainWindow_overlay, "objectName": "ConfirmStoringSeedPhrasePanel_storeCheck", "type": "StatusCheckBox", "checkable": True, "visible": True}
|
||||
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": "StatusMenuItemDelegate", "visible": True}
|
||||
userContextmenu_InActiveButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuInactiveAction", "type": "StatusMenuItemDelegate", "visible": True}
|
||||
userContextmenu_AutomaticButton= {"container": statusDesktop_mainWindow_overlay, "objectName": "userStatusMenuAutomaticAction", "type": "StatusMenuItemDelegate", "visible": True}
|
||||
|
||||
# Change Password Menu
|
||||
change_password_menu_current_password_text_field = {"container": statusDesktop_mainWindow_overlay, "objectName": "passwordViewCurrentPasswordTextField", "type": "StyledTextField", "visible": True}
|
||||
change_password_menu_new_password_text_field = {"container": statusDesktop_mainWindow_overlay, "objectName": "passwordViewNewPasswordTextField", "type": "StyledTextField", "visible": True}
|
||||
change_password_menu_new_password_confirm_text_field = {"container": statusDesktop_mainWindow_overlay, "objectName": "passwordViewNewPasswordConfirmTextField", "type": "StyledTextField", "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}
|
||||
|
||||
|
|
|
@ -159,15 +159,15 @@ def step(context):
|
|||
def step(context):
|
||||
_settingsScreen.verify_seed_phrase_indicator_not_visible()
|
||||
|
||||
@When("the users switches his state to offline")
|
||||
@When("the users switches state to offline")
|
||||
def step(context: any):
|
||||
_statusMain.set_user_state_offline()
|
||||
|
||||
@When("the users switches his state to online")
|
||||
@When("the users switches state to online")
|
||||
def step(context: any):
|
||||
_statusMain.set_user_state_online()
|
||||
|
||||
@When("the users switches his state to automatic")
|
||||
@When("the users switches state to automatic")
|
||||
def step(context: any):
|
||||
_statusMain.set_user_state_to_automatic()
|
||||
|
||||
|
@ -193,4 +193,8 @@ def step(context, display_name):
|
|||
|
||||
@When("in profile popup the user sets display name to \"|any|\"")
|
||||
def step(context, display_name):
|
||||
_statusMain.set_profile_popup_display_name(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):
|
||||
_settingsScreen.change_user_password(oldPassword, newPassword)
|
||||
|
|
|
@ -21,30 +21,34 @@ Feature: Status Desktop Settings Menu
|
|||
Then the backup seed phrase indicator is not displayed
|
||||
|
||||
@merge
|
||||
Scenario: The user can switch his state to offline
|
||||
When the users switches his state to offline
|
||||
Scenario: The user can switch state to offline
|
||||
When the users switches state to offline
|
||||
Then the user appears offline
|
||||
When the user restarts the app
|
||||
And the user tester123 logs in with password TesTEr16843/!@00
|
||||
Then the user appears offline
|
||||
|
||||
@merge
|
||||
Scenario: The user can switch his state to online
|
||||
When the users switches his state to offline
|
||||
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 appears offline
|
||||
When the users switches his state to online
|
||||
When the users switches state to online
|
||||
Then the user appears online
|
||||
When the user restarts the app
|
||||
And the user tester123 logs in with password TesTEr16843/!@00
|
||||
Then the user appears online
|
||||
|
||||
Scenario: The user can switch his state to automatic
|
||||
When the users switches his state to automatic
|
||||
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 status is automatic
|
||||
|
||||
|
||||
Scenario: The user can change the password and login with new password
|
||||
When the user changes the password from TesTEr16843/!@00 to NewPassword@12345
|
||||
And the user restarts the app
|
||||
And the user tester123 logs in with password NewPassword@12345
|
||||
Then the user lands on the signed in app
|
||||
|
|
|
@ -24,7 +24,7 @@ StatusModal {
|
|||
|
||||
function onChangePasswordResponse(success, errorMsg) {
|
||||
if (success) {
|
||||
if (Qt.platform.os === "osx") {
|
||||
if (Qt.platform.os === "osx" && localAccountSettings.storeToKeychainValue !== Constants.storeToKeychainValueNever) {
|
||||
localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.store;
|
||||
root.privacyStore.storeToKeyChain(d.passwordProcessing);
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ StatusModal {
|
|||
rightButtons: [
|
||||
StatusButton {
|
||||
id: submitBtn
|
||||
objectName: "changePasswordModalSubmitButton"
|
||||
text: qsTr("Change Password")
|
||||
enabled: !submitBtn.loading && view.ready
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ StatusModal {
|
|||
|
||||
StatusButton {
|
||||
id: submitBtn
|
||||
objectName:"changePasswordSuccessModalSignOutAndQuitButton"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Sign out & Quit")
|
||||
onClicked: {
|
||||
|
|
|
@ -26,6 +26,7 @@ SettingsContentBase {
|
|||
property PrivacyStore privacyStore
|
||||
|
||||
titleRowComponentLoader.sourceComponent: StatusButton {
|
||||
objectName: "profileSettingsChangePasswordButton"
|
||||
text: qsTr("Change Password")
|
||||
onClicked: changePasswordModal.open()
|
||||
enabled: !userProfile.isKeycardUser
|
||||
|
|
|
@ -168,6 +168,7 @@ Column {
|
|||
// TODO replace with StatusInput as soon as it supports password
|
||||
Input {
|
||||
id: currentPswInput
|
||||
textField.objectName: "passwordViewCurrentPasswordTextField"
|
||||
|
||||
property bool showPassword
|
||||
|
||||
|
@ -204,6 +205,7 @@ Column {
|
|||
// TODO replace with StatusInput as soon as it supports password
|
||||
Input {
|
||||
id: newPswInput
|
||||
textField.objectName: "passwordViewNewPasswordTextField"
|
||||
|
||||
property bool showPassword
|
||||
|
||||
|
@ -303,6 +305,7 @@ Column {
|
|||
// TODO replace with StatusInput as soon as it supports password
|
||||
Input {
|
||||
id: confirmPswInput
|
||||
textField.objectName: "passwordViewNewPasswordConfirmTextField"
|
||||
|
||||
property bool showPassword
|
||||
|
||||
|
|
Loading…
Reference in New Issue