Skip to content

Commit

Permalink
Update tests according to new dialog password method
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakonian committed May 23, 2024
1 parent 01a70b9 commit 6bfe79b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ codeunit 135033 "Password Dialog Test"
PermissionsMock.Set('All Objects');

// [WHEN] The password dialog is opened in change password mode.
PasswordDialogManagement.OpenChangePasswordDialog(CurrentPassword, Password);
PasswordDialogManagement.OpenPasswordChangeDialog(CurrentPassword, Password);

// [THEN] The Old and New passwords are retrieved.
Assert.AreEqual(InValidPasswordTxt, GetPasswordValue(CurrentPassword), 'A diferrent password was expected.');
// [THEN] The New passwords was retrieved.
Assert.AreEqual('', GetPasswordValue(CurrentPassword), 'A diferrent password was expected.');
Assert.AreEqual(ValidPasswordTxt, GetPasswordValue(Password), 'A diferrent password was expected.')
end;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ codeunit 130045 "System Initialization Test"
CompanyTriggers: Codeunit "Company Triggers";
PasswordDialogManagement: Codeunit "Password Dialog Management";
PermissionsMock: Codeunit "Permissions Mock";
OldPassword: SecretText;
CurrentPassword: SecretText;
NewPassword: SecretText;
begin
PermissionsMock.Set('System Init Exec');
// [WHEN] Calling CompanyTriggers.OnCompanyOpen()
CompanyTriggers.OnCompanyOpenCompleted();

// [THEN] Calling PasswordDialog.OpenChangePasswordDialog should NOT results in an error
PasswordDialogManagement.OpenChangePasswordDialog(OldPassword, NewPassword);
// [THEN] Calling PasswordDialog.OpenPasswordChangeDialog should NOT results in an error
PasswordDialogManagement.OpenPasswordChangeDialog(CurrentPassword, NewPassword);
end;

[ModalPageHandler]
Expand Down

0 comments on commit 6bfe79b

Please sign in to comment.